mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 15:11:36 -04:00
Improved getangle script behaviour
This commit is contained in:
parent
1fd59d0ce0
commit
e3a9f73eb6
@ -153,15 +153,15 @@ namespace MWScript
|
|||||||
|
|
||||||
if (axis=="x")
|
if (axis=="x")
|
||||||
{
|
{
|
||||||
runtime.push(Ogre::Radian(ptr.getRefData().getPosition().rot[0]+ptr.getRefData().getLocalRotation().rot[0]).valueDegrees());
|
runtime.push(Ogre::Radian(ptr.getRefData().getPosition().rot[0]).valueDegrees()+ptr.getRefData().getLocalRotation().rot[0]);
|
||||||
}
|
}
|
||||||
else if (axis=="y")
|
else if (axis=="y")
|
||||||
{
|
{
|
||||||
runtime.push(Ogre::Radian(ptr.getRefData().getPosition().rot[1]+ptr.getRefData().getLocalRotation().rot[1]).valueDegrees());
|
runtime.push(Ogre::Radian(ptr.getRefData().getPosition().rot[1]).valueDegrees()+ptr.getRefData().getLocalRotation().rot[1]);
|
||||||
}
|
}
|
||||||
else if (axis=="z")
|
else if (axis=="z")
|
||||||
{
|
{
|
||||||
runtime.push(Ogre::Radian(ptr.getRefData().getPosition().rot[2]+ptr.getRefData().getLocalRotation().rot[2]).valueDegrees());
|
runtime.push(Ogre::Radian(ptr.getRefData().getPosition().rot[2]).valueDegrees()+ptr.getRefData().getLocalRotation().rot[2]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw std::runtime_error ("invalid ration axis: " + axis);
|
throw std::runtime_error ("invalid ration axis: " + axis);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user