1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-31 23:15:41 +00:00

Don't greet dead actors in AiWander

This commit is contained in:
scrawl 2014-09-09 00:43:12 +02:00
parent c54ab2e846
commit 780a48cd1e

View file

@ -434,7 +434,8 @@ namespace MWMechanics
if (mSaidGreeting == Greet_None)
{
if ((playerDistSqr <= helloDistance*helloDistance) && MWBase::Environment::get().getWorld()->getLOS(player, actor)
if ((playerDistSqr <= helloDistance*helloDistance) &&
!player.getClass().getCreatureStats(player).isDead() && MWBase::Environment::get().getWorld()->getLOS(player, actor)
&& MWBase::Environment::get().getMechanicsManager()->awarenessCheck(player, actor))
mGreetingTimer++;