diff --git a/apps/openmw-mp/Script/Functions/World.cpp b/apps/openmw-mp/Script/Functions/World.cpp index c21354af2..62d47f638 100644 --- a/apps/openmw-mp/Script/Functions/World.cpp +++ b/apps/openmw-mp/Script/Functions/World.cpp @@ -131,6 +131,11 @@ unsigned int WorldFunctions::GetObjectChangesSize() noexcept return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.count; } +unsigned int WorldFunctions::GetBaseEventAction() noexcept +{ + return mwmp::Networking::getPtr()->getLastEvent()->action; +} + const char *WorldFunctions::GetObjectRefId(unsigned int i) noexcept { return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).refId.c_str(); diff --git a/apps/openmw-mp/Script/Functions/World.hpp b/apps/openmw-mp/Script/Functions/World.hpp index 6f1b95092..7331b533d 100644 --- a/apps/openmw-mp/Script/Functions/World.hpp +++ b/apps/openmw-mp/Script/Functions/World.hpp @@ -20,6 +20,7 @@ {"SetObjectRotation", WorldFunctions::SetObjectRotation},\ \ {"GetObjectChangesSize", WorldFunctions::GetObjectChangesSize},\ + {"GetBaseEventAction", WorldFunctions::GetBaseEventAction},\ \ {"GetObjectRefId", WorldFunctions::GetObjectRefId},\ {"GetObjectRefNumIndex", WorldFunctions::GetObjectRefNumIndex},\ @@ -71,6 +72,7 @@ public: static void SetObjectRotation(double x, double y, double z) noexcept; static unsigned int GetObjectChangesSize() noexcept; + static unsigned int GetBaseEventAction() noexcept; static const char *GetObjectRefId(unsigned int i) noexcept; static int GetObjectRefNumIndex(unsigned int i) noexcept;