1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-22 23:23:53 +00:00

Disable NPC collision only when death animation has finished (#3666)

This commit is contained in:
Leon Krieg 2016-12-15 19:29:05 +01:00
parent 81b9b07820
commit 12c8c3276a

View file

@ -1271,8 +1271,6 @@ namespace MWMechanics
stats.getActiveSpells().clear(); stats.getActiveSpells().clear();
calculateCreatureStatModifiers(iter->first, 0); calculateCreatureStatModifiers(iter->first, 0);
MWBase::Environment::get().getWorld()->enableActorCollision(iter->first, false);
if (cls.isEssential(iter->first)) if (cls.isEssential(iter->first))
MWBase::Environment::get().getWindowManager()->messageBox("#{sKilledEssential}"); MWBase::Environment::get().getWindowManager()->messageBox("#{sKilledEssential}");
} }
@ -1290,6 +1288,11 @@ namespace MWMechanics
//player's death animation is over //player's death animation is over
MWBase::Environment::get().getStateManager()->askLoadRecent(); MWBase::Environment::get().getStateManager()->askLoadRecent();
} }
else
{
// NPC death animation is over, disable actor collision
MWBase::Environment::get().getWorld()->enableActorCollision(iter->first, false);
}
// Play Death Music if it was the player dying // Play Death Music if it was the player dying
if(iter->first == getPlayer()) if(iter->first == getPlayer())