|
|
|
@ -232,7 +232,7 @@ namespace MWScript
|
|
|
|
|
else
|
|
|
|
|
throw std::runtime_error ("invalid axis: " + axis);
|
|
|
|
|
|
|
|
|
|
dynamic_cast<MWScript::InterpreterContext&>(runtime.getContext()).updatePtr(updated);
|
|
|
|
|
dynamic_cast<MWScript::InterpreterContext&>(runtime.getContext()).updatePtr(ptr,updated);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -312,9 +312,9 @@ namespace MWScript
|
|
|
|
|
}
|
|
|
|
|
if(store)
|
|
|
|
|
{
|
|
|
|
|
MWWorld::Ptr base = ptr;
|
|
|
|
|
ptr = MWBase::Environment::get().getWorld()->moveObject(ptr,store,x,y,z);
|
|
|
|
|
|
|
|
|
|
dynamic_cast<MWScript::InterpreterContext&>(runtime.getContext()).updatePtr(ptr);
|
|
|
|
|
dynamic_cast<MWScript::InterpreterContext&>(runtime.getContext()).updatePtr(base,ptr);
|
|
|
|
|
|
|
|
|
|
float ax = osg::RadiansToDegrees(ptr.getRefData().getPosition().rot[0]);
|
|
|
|
|
float ay = osg::RadiansToDegrees(ptr.getRefData().getPosition().rot[1]);
|
|
|
|
@ -360,6 +360,7 @@ namespace MWScript
|
|
|
|
|
|
|
|
|
|
// another morrowind oddity: player will be moved to the exterior cell at this location,
|
|
|
|
|
// non-player actors will move within the cell they are in.
|
|
|
|
|
MWWorld::Ptr base = ptr;
|
|
|
|
|
if (ptr == MWMechanics::getPlayer())
|
|
|
|
|
{
|
|
|
|
|
MWWorld::CellStore* cell = MWBase::Environment::get().getWorld()->getExterior(cx,cy);
|
|
|
|
@ -369,7 +370,7 @@ namespace MWScript
|
|
|
|
|
{
|
|
|
|
|
ptr = MWBase::Environment::get().getWorld()->moveObject(ptr, x, y, z);
|
|
|
|
|
}
|
|
|
|
|
dynamic_cast<MWScript::InterpreterContext&>(runtime.getContext()).updatePtr(ptr);
|
|
|
|
|
dynamic_cast<MWScript::InterpreterContext&>(runtime.getContext()).updatePtr(base,ptr);
|
|
|
|
|
|
|
|
|
|
float ax = osg::RadiansToDegrees(ptr.getRefData().getPosition().rot[0]);
|
|
|
|
|
float ay = osg::RadiansToDegrees(ptr.getRefData().getPosition().rot[1]);
|
|
|
|
@ -626,7 +627,7 @@ namespace MWScript
|
|
|
|
|
|
|
|
|
|
MWBase::Environment::get().getWorld()->rotateObject(ptr, xr, yr, zr);
|
|
|
|
|
|
|
|
|
|
dynamic_cast<MWScript::InterpreterContext&>(runtime.getContext()).updatePtr(
|
|
|
|
|
dynamic_cast<MWScript::InterpreterContext&>(runtime.getContext()).updatePtr(ptr,
|
|
|
|
|
MWBase::Environment::get().getWorld()->moveObject(ptr, ptr.getCellRef().getPosition().pos[0],
|
|
|
|
|
ptr.getCellRef().getPosition().pos[1], ptr.getCellRef().getPosition().pos[2]));
|
|
|
|
|
|
|
|
|
|