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:
parent
c0ee382c72
commit
684208dfc9
1 changed files with 8 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue