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:
parent
61cb0f98a6
commit
fd2c07a6f4
1 changed files with 13 additions and 10 deletions
|
@ -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)));
|
||||
|
|
Loading…
Reference in a new issue