From 0d3976950bf90789280fea8d1b24ab271a19f08a Mon Sep 17 00:00:00 2001 From: David Cernat Date: Sat, 10 Jun 2017 17:06:09 +0300 Subject: [PATCH] [Server] Use consistent names for rotation script functions --- apps/openmw-mp/Script/Functions/Positions.cpp | 8 +++---- apps/openmw-mp/Script/Functions/Positions.hpp | 22 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/apps/openmw-mp/Script/Functions/Positions.cpp b/apps/openmw-mp/Script/Functions/Positions.cpp index 359be4898..cd2f26f5a 100644 --- a/apps/openmw-mp/Script/Functions/Positions.cpp +++ b/apps/openmw-mp/Script/Functions/Positions.cpp @@ -45,7 +45,7 @@ double PositionFunctions::GetPosZ(unsigned short pid) noexcept return player->position.pos[2]; } -void PositionFunctions::GetAngle(unsigned short pid, float *x, float *y, float *z) noexcept +void PositionFunctions::GetRot(unsigned short pid, float *x, float *y, float *z) noexcept { *x = 0.00; *y = 0.00; @@ -59,7 +59,7 @@ void PositionFunctions::GetAngle(unsigned short pid, float *x, float *y, float * *z = player->position.rot[2]; } -double PositionFunctions::GetAngleX(unsigned short pid) noexcept +double PositionFunctions::GetRotX(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player, 0.0f); @@ -67,7 +67,7 @@ double PositionFunctions::GetAngleX(unsigned short pid) noexcept return player->position.rot[0]; } -double PositionFunctions::GetAngleZ(unsigned short pid) noexcept +double PositionFunctions::GetRotZ(unsigned short pid) noexcept { Player *player; GET_PLAYER(pid, player, 0.0f); @@ -85,7 +85,7 @@ void PositionFunctions::SetPos(unsigned short pid, double x, double y, double z) player->position.pos[2] = z; } -void PositionFunctions::SetAngle(unsigned short pid, double x, double z) noexcept +void PositionFunctions::SetRot(unsigned short pid, double x, double z) noexcept { Player *player; GET_PLAYER(pid, player, ); diff --git a/apps/openmw-mp/Script/Functions/Positions.hpp b/apps/openmw-mp/Script/Functions/Positions.hpp index 519fb3df1..570a689ad 100644 --- a/apps/openmw-mp/Script/Functions/Positions.hpp +++ b/apps/openmw-mp/Script/Functions/Positions.hpp @@ -8,14 +8,14 @@ {"GetPosX", PositionFunctions::GetPosX},\ {"GetPosY", PositionFunctions::GetPosY},\ {"GetPosZ", PositionFunctions::GetPosZ},\ -\ - {"GetAngle", PositionFunctions::GetAngle},\ - {"GetAngleX", PositionFunctions::GetAngleX},\ - {"GetAngleZ", PositionFunctions::GetAngleZ},\ -\ + \ + {"GetRot", PositionFunctions::GetRot},\ + {"GetRotX", PositionFunctions::GetRotX},\ + {"GetRotZ", PositionFunctions::GetRotZ},\ + \ {"SetPos", PositionFunctions::SetPos},\ - {"SetAngle", PositionFunctions::SetAngle},\ -\ + {"SetRot", PositionFunctions::SetRot},\ + \ {"SendPos", PositionFunctions::SendPos} @@ -27,12 +27,12 @@ public: static double GetPosY(unsigned short pid) noexcept; static double GetPosZ(unsigned short pid) noexcept; - static void GetAngle(unsigned short pid, float *x, float *y, float *z) noexcept; - static double GetAngleX(unsigned short pid) noexcept; - static double GetAngleZ(unsigned short pid) noexcept; + static void GetRot(unsigned short pid, float *x, float *y, float *z) noexcept; + static double GetRotX(unsigned short pid) noexcept; + static double GetRotZ(unsigned short pid) noexcept; static void SetPos(unsigned short pid, double x, double y, double z) noexcept; - static void SetAngle(unsigned short pid, double x, double z) noexcept; + static void SetRot(unsigned short pid, double x, double z) noexcept; static void SendPos(unsigned short pid) noexcept; };