mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 02:15: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())
|
||||
continue;
|
||||
|
||||
// Unconsious actor can not report about crime
|
||||
if (it->getClass().getCreatureStats(*it).getKnockedDown())
|
||||
continue;
|
||||
|
||||
if ((*it == victim && victimAware)
|
||||
|| (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).
|
||||
|
@ -1208,12 +1212,16 @@ namespace MWMechanics
|
|||
// Tell everyone (including the original reporter) in alarm range
|
||||
for (std::vector<MWWorld::Ptr>::iterator it = neighbors.begin(); it != neighbors.end(); ++it)
|
||||
{
|
||||
if ( *it == player
|
||||
if (*it == player
|
||||
|| !it->getClass().isNpc() || it->getClass().getCreatureStats(*it).isDead()) continue;
|
||||
|
||||
if (it->getClass().getCreatureStats(*it).getAiSequence().isInCombat(victim))
|
||||
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
|
||||
if (it->getClass().getCreatureStats(*it).getAiSequence().hasPackage(AiPackage::TypeIdFollow))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue