mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 06:53:53 +00:00
Issue #176: made actor deregistration more robust
This commit is contained in:
parent
b494533bb2
commit
c0ee382c72
2 changed files with 6 additions and 1 deletions
|
@ -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…
Reference in a new issue