mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-20 18:41:32 +00:00
Make unconscious actors do not report about crimes
This commit is contained in:
parent
34895157f9
commit
3ebb18ce18
1 changed files with 9 additions and 1 deletions
|
@ -1097,6 +1097,10 @@ namespace MWMechanics
|
||||||
if (it->getClass().getCreatureStats(*it).isDead())
|
if (it->getClass().getCreatureStats(*it).isDead())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// Unconsious actor can not report about crime
|
||||||
|
if (it->getClass().getCreatureStats(*it).getKnockedDown())
|
||||||
|
continue;
|
||||||
|
|
||||||
if ((*it == victim && victimAware)
|
if ((*it == victim && victimAware)
|
||||||
|| (MWBase::Environment::get().getWorld()->getLOS(player, *it) && awarenessCheck(player, *it) )
|
|| (MWBase::Environment::get().getWorld()->getLOS(player, *it) && awarenessCheck(player, *it) )
|
||||||
// Murder crime can be reported even if no one saw it (hearing is enough, I guess).
|
// Murder crime can be reported even if no one saw it (hearing is enough, I guess).
|
||||||
|
@ -1214,6 +1218,10 @@ namespace MWMechanics
|
||||||
if (it->getClass().getCreatureStats(*it).getAiSequence().isInCombat(victim))
|
if (it->getClass().getCreatureStats(*it).getAiSequence().isInCombat(victim))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// Unconsious actor can not report about crime and should not become hostile
|
||||||
|
if (it->getClass().getCreatureStats(*it).getKnockedDown())
|
||||||
|
continue;
|
||||||
|
|
||||||
// Player's followers should not attack player, or try to arrest him
|
// Player's followers should not attack player, or try to arrest him
|
||||||
if (it->getClass().getCreatureStats(*it).getAiSequence().hasPackage(AiPackage::TypeIdFollow))
|
if (it->getClass().getCreatureStats(*it).getAiSequence().hasPackage(AiPackage::TypeIdFollow))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue