mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 21:45:32 +00:00
Ignore the object scale in Move instruction (Fixes #2275)
This commit is contained in:
parent
9825b68dfb
commit
6ea59c93ab
1 changed files with 4 additions and 4 deletions
|
@ -691,10 +691,10 @@ namespace MWScript
|
|||
if (!ptr.getRefData().getBaseNode())
|
||||
return;
|
||||
|
||||
Ogre::Vector3 worldPos = ptr.getRefData().getBaseNode()->convertLocalToWorldPosition(posChange);
|
||||
|
||||
dynamic_cast<MWScript::InterpreterContext&>(runtime.getContext()).updatePtr(
|
||||
MWBase::Environment::get().getWorld()->moveObject(ptr, worldPos.x, worldPos.y, worldPos.z));
|
||||
Ogre::Vector3 diff = ptr.getRefData().getBaseNode()->getOrientation() * posChange;
|
||||
Ogre::Vector3 worldPos(ptr.getRefData().getPosition().pos);
|
||||
worldPos += diff;
|
||||
MWBase::Environment::get().getWorld()->moveObject(ptr, worldPos.x, worldPos.y, worldPos.z);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue