mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-04 15:11:32 +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)
|
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);
|
MWRender::Animation *anim = MWBase::Environment::get().getWorld()->getAnimation(ptr);
|
||||||
if(!MWWorld::Class::get(ptr).getCreatureStats(ptr).isDead())
|
if(!MWWorld::Class::get(ptr).getCreatureStats(ptr).isDead())
|
||||||
mActors.insert(std::make_pair(ptr, CharacterController(ptr, anim, CharState_Idle, true)));
|
mActors.insert(std::make_pair(ptr, CharacterController(ptr, anim, CharState_Idle, true)));
|
||||||
|
|
Loading…
Reference in a new issue