1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-21 10:39:39 +00:00

delete death events on adding an actor to the scene

This commit is contained in:
Marc Zinnschlag 2013-03-18 10:54:47 +01:00
parent 61cb0f98a6
commit fd2c07a6f4

View file

@ -164,6 +164,9 @@ namespace MWMechanics
void Actors::addActor (const MWWorld::Ptr& ptr)
{
// erase previous death events since we are currently only tracking them while in an active cell
MWWorld::Class::get (ptr).getCreatureStats (ptr).clearHasDied();
MWRender::Animation *anim = MWBase::Environment::get().getWorld()->getAnimation(ptr);
if(!MWWorld::Class::get(ptr).getCreatureStats(ptr).isDead())
mActors.insert(std::make_pair(ptr, CharacterController(ptr, anim, CharState_Idle, true)));