diff --git a/apps/openmw-mp/Script/Functions/World.cpp b/apps/openmw-mp/Script/Functions/World.cpp index e4e556092..15500f9aa 100644 --- a/apps/openmw-mp/Script/Functions/World.cpp +++ b/apps/openmw-mp/Script/Functions/World.cpp @@ -83,6 +83,11 @@ void WorldFunctions::SetObjectGoldValue(int goldValue) noexcept tempWorldObject.goldValue = goldValue; } +void WorldFunctions::SetObjectScale(int scale) noexcept +{ + tempWorldObject.scale = scale; +} + void WorldFunctions::SetObjectPosition(double x, double y, double z) noexcept { tempWorldObject.pos.pos[0] = x; @@ -122,6 +127,11 @@ int WorldFunctions::GetObjectGoldValue(unsigned int i) noexcept return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).goldValue; } +int WorldFunctions::GetObjectScale(unsigned int i) noexcept +{ + return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).scale; +} + double WorldFunctions::GetObjectPosX(unsigned int i) noexcept { return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).pos.pos[0]; diff --git a/apps/openmw-mp/Script/Functions/World.hpp b/apps/openmw-mp/Script/Functions/World.hpp index b72681e62..52ce87bfe 100644 --- a/apps/openmw-mp/Script/Functions/World.hpp +++ b/apps/openmw-mp/Script/Functions/World.hpp @@ -11,6 +11,7 @@ {"SetObjectRefNumIndex", WorldFunctions::SetObjectRefNumIndex},\ {"SetObjectCount", WorldFunctions::SetObjectCount},\ {"SetObjectGoldValue", WorldFunctions::SetObjectGoldValue},\ + {"SetObjectScale", WorldFunctions::SetObjectScale},\ {"SetObjectPosition", WorldFunctions::SetObjectPosition},\ {"SetObjectRotation", WorldFunctions::SetObjectRotation},\ \ @@ -20,6 +21,7 @@ {"GetObjectRefNumIndex", WorldFunctions::GetObjectRefNumIndex},\ {"GetObjectCount", WorldFunctions::GetObjectCount},\ {"GetObjectGoldValue", WorldFunctions::GetObjectGoldValue},\ + {"GetObjectScale", WorldFunctions::GetObjectScale},\ {"GetObjectPosX", WorldFunctions::GetObjectPosX},\ {"GetObjectPosY", WorldFunctions::GetObjectPosY},\ {"GetObjectPosZ", WorldFunctions::GetObjectPosZ},\ @@ -47,6 +49,7 @@ public: static void SetObjectRefNumIndex(int refNumIndex) noexcept; static void SetObjectCount(int count) noexcept; static void SetObjectGoldValue(int goldValue) noexcept; + static void SetObjectScale(int scale) noexcept; static void SetObjectPosition(double x, double y, double z) noexcept; static void SetObjectRotation(double x, double y, double z) noexcept; @@ -56,6 +59,7 @@ public: static int GetObjectRefNumIndex(unsigned int i) noexcept; static int GetObjectCount(unsigned int i) noexcept; static int GetObjectGoldValue(unsigned int i) noexcept; + static int GetObjectScale(unsigned int i) noexcept; static double GetObjectPosX(unsigned int i) noexcept; static double GetObjectPosY(unsigned int i) noexcept; static double GetObjectPosZ(unsigned int i) noexcept;