Issue #68: Keep dead actors out of the actor list for the current scene

actorid
Marc Zinnschlag 12 years ago
parent 7884a927c9
commit f2e25b8a47

@ -39,6 +39,8 @@ namespace MWBase
virtual void addActor (const MWWorld::Ptr& ptr) = 0;
///< Register an actor for stats management
///
/// \note Dead actors are ignored.
virtual void removeActor (const MWWorld::Ptr& ptr) = 0;
///< Deregister an actor for stats management

@ -165,7 +165,8 @@ namespace MWMechanics
void Actors::addActor (const MWWorld::Ptr& ptr)
{
mActors.insert (ptr);
if (!MWWorld::Class::get (ptr).getCreatureStats (ptr).isDead())
mActors.insert (ptr);
}
void Actors::removeActor (const MWWorld::Ptr& ptr)

@ -40,6 +40,8 @@ namespace MWMechanics
void addActor (const MWWorld::Ptr& ptr);
///< Register an actor for stats management
///
/// \note Dead actors are ignored.
void removeActor (const MWWorld::Ptr& ptr);
///< Deregister an actor for stats management

@ -41,6 +41,8 @@ namespace MWMechanics
virtual void addActor (const MWWorld::Ptr& ptr);
///< Register an actor for stats management
///
/// \note Dead actors are ignored.
virtual void removeActor (const MWWorld::Ptr& ptr);
///< Deregister an actor for stats management

Loading…
Cancel
Save