|
|
@ -193,6 +193,11 @@ namespace MWWorld
|
|
|
|
const ESM::Position &refpos = ptr.getRefData().getPosition();
|
|
|
|
const ESM::Position &refpos = ptr.getRefData().getPosition();
|
|
|
|
Ogre::Vector3 position(refpos.pos);
|
|
|
|
Ogre::Vector3 position(refpos.pos);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Early-out for totally static creatures
|
|
|
|
|
|
|
|
// (Not sure if gravity should still apply?)
|
|
|
|
|
|
|
|
if (!ptr.getClass().canWalk(ptr) && !isFlying && !ptr.getClass().canSwim(ptr))
|
|
|
|
|
|
|
|
return position;
|
|
|
|
|
|
|
|
|
|
|
|
/* Anything to collide with? */
|
|
|
|
/* Anything to collide with? */
|
|
|
|
OEngine::Physic::PhysicActor *physicActor = engine->getCharacter(ptr.getRefData().getHandle());
|
|
|
|
OEngine::Physic::PhysicActor *physicActor = engine->getCharacter(ptr.getRefData().getHandle());
|
|
|
|
if(!physicActor || !physicActor->getCollisionMode())
|
|
|
|
if(!physicActor || !physicActor->getCollisionMode())
|
|
|
|