Issue #176: made actor deregistration more robust

actorid
Marc Zinnschlag 13 years ago
parent b494533bb2
commit c0ee382c72

@ -71,7 +71,10 @@ namespace MWMechanics
void Actors::removeActor (const MWWorld::Ptr& ptr)
{
mActors.erase (ptr);
std::set<MWWorld::Ptr>::iterator iter = mActors.find (ptr);
if (iter!=mActors.end())
mActors.erase (iter);
}
void Actors::dropActors (const MWWorld::Ptr::CellStore *cellStore)

@ -32,6 +32,8 @@ namespace MWMechanics
void removeActor (const MWWorld::Ptr& ptr);
///< Deregister an actor for stats management
///
/// \note Ignored, if \a ptr is not a registered actor.
void dropActors (const MWWorld::Ptr::CellStore *cellStore);
///< Deregister all actors in the given cell.

Loading…
Cancel
Save