mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 06:53:52 +00:00
connected object-manipulator functions in world to physics interface
This commit is contained in:
parent
9a5a6eac2b
commit
5486c70edf
1 changed files with 10 additions and 3 deletions
|
@ -21,6 +21,7 @@
|
|||
|
||||
#include "refdata.hpp"
|
||||
#include "globals.hpp"
|
||||
#include "doingphysics.hpp"
|
||||
|
||||
namespace
|
||||
{
|
||||
|
@ -745,14 +746,17 @@ namespace MWWorld
|
|||
|
||||
if (MWRender::CellRender *render = searchRender (ptr.getCell()))
|
||||
{
|
||||
render->deleteObject (ptr.getRefData().getHandle());
|
||||
ptr.getRefData().setHandle ("");
|
||||
|
||||
if (mActiveCells.find (ptr.getCell())!=mActiveCells.end())
|
||||
{
|
||||
Class::get (ptr).disable (ptr, mEnvironment);
|
||||
mEnvironment.mSoundManager->stopSound3D (ptr);
|
||||
|
||||
if (!DoingPhysics::isDoingPhysics())
|
||||
mScene.removeObject (ptr.getRefData().getHandle());
|
||||
}
|
||||
|
||||
render->deleteObject (ptr.getRefData().getHandle());
|
||||
ptr.getRefData().setHandle ("");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -778,6 +782,9 @@ namespace MWWorld
|
|||
if (mCurrentCell->cell->data.gridX!=cellX || mCurrentCell->cell->data.gridY!=cellY)
|
||||
{
|
||||
changeCell (cellX, cellY, mPlayer->getPlayer().getCellRef().pos);
|
||||
|
||||
if (!DoingPhysics::isDoingPhysics())
|
||||
mScene.moveObject (ptr.getRefData().getHandle(), Ogre::Vector3 (x, y, z));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue