1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-05 15:55:45 +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++;