1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 21:23:52 +00:00

Issue #176: when deleting objects, don't go through disable to remove actors from the mechanics manager

This commit is contained in:
Marc Zinnschlag 2012-05-24 13:26:07 +02:00
parent c0ee382c72
commit 684208dfc9

View file

@ -553,16 +553,17 @@ namespace MWWorld
{
ptr.getRefData().setCount (0);
if (mWorldScene->getActiveCells().find (ptr.getCell())!=mWorldScene->getActiveCells().end())
{
MWBase::Environment::get().getMechanicsManager()->removeActor (ptr);
if (mWorldScene->getActiveCells().find (ptr.getCell())!=mWorldScene->getActiveCells().end()){
// Class::get (ptr).disable (ptr, mEnvironment); /// \todo this line needs to be removed
MWBase::Environment::get().getSoundManager()->stopSound3D (ptr);
MWBase::Environment::get().getSoundManager()->stopSound3D (ptr);
mPhysics->removeObject (ptr.getRefData().getHandle());
mRendering->removeObject(ptr);
mPhysics->removeObject (ptr.getRefData().getHandle());
mRendering->removeObject(ptr);
mLocalScripts.remove (ptr);
}
mLocalScripts.remove (ptr);
}
}
}