|
|
@ -691,10 +691,10 @@ namespace MWScript
|
|
|
|
if (!ptr.getRefData().getBaseNode())
|
|
|
|
if (!ptr.getRefData().getBaseNode())
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
Ogre::Vector3 worldPos = ptr.getRefData().getBaseNode()->convertLocalToWorldPosition(posChange);
|
|
|
|
Ogre::Vector3 diff = ptr.getRefData().getBaseNode()->getOrientation() * posChange;
|
|
|
|
|
|
|
|
Ogre::Vector3 worldPos(ptr.getRefData().getPosition().pos);
|
|
|
|
dynamic_cast<MWScript::InterpreterContext&>(runtime.getContext()).updatePtr(
|
|
|
|
worldPos += diff;
|
|
|
|
MWBase::Environment::get().getWorld()->moveObject(ptr, worldPos.x, worldPos.y, worldPos.z));
|
|
|
|
MWBase::Environment::get().getWorld()->moveObject(ptr, worldPos.x, worldPos.y, worldPos.z);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|