diff --git a/apps/openmw-mp/Script/Functions/Actors.cpp b/apps/openmw-mp/Script/Functions/Actors.cpp index 225592ea9..8bae87a65 100644 --- a/apps/openmw-mp/Script/Functions/Actors.cpp +++ b/apps/openmw-mp/Script/Functions/Actors.cpp @@ -34,6 +34,11 @@ unsigned char ActorFunctions::GetLastActorListAction() noexcept return mwmp::Networking::getPtr()->getLastActorList()->action; } +const char *ActorFunctions::GetActorCell(unsigned int i) noexcept +{ + return mwmp::Networking::getPtr()->getLastActorList()->baseActors.at(i).cell.getDescription().c_str(); +} + const char *ActorFunctions::GetActorRefId(unsigned int i) noexcept { return mwmp::Networking::getPtr()->getLastActorList()->baseActors.at(i).refId.c_str(); diff --git a/apps/openmw-mp/Script/Functions/Actors.hpp b/apps/openmw-mp/Script/Functions/Actors.hpp index 151e1e9fd..efafd9384 100644 --- a/apps/openmw-mp/Script/Functions/Actors.hpp +++ b/apps/openmw-mp/Script/Functions/Actors.hpp @@ -7,6 +7,7 @@ {"GetActorListSize", ActorFunctions::GetActorListSize},\ {"GetLastActorListAction", ActorFunctions::GetLastActorListAction},\ \ + {"GetActorCell", ActorFunctions::GetActorCell},\ {"GetActorRefId", ActorFunctions::GetActorRefId},\ {"GetActorRefNumIndex", ActorFunctions::GetActorRefNumIndex},\ {"GetActorMpNum", ActorFunctions::GetActorMpNum},\ @@ -32,6 +33,7 @@ public: static unsigned int GetActorListSize() noexcept; static unsigned char GetLastActorListAction() noexcept; + static const char *GetActorCell(unsigned int i) noexcept; static const char *GetActorRefId(unsigned int i) noexcept; static int GetActorRefNumIndex(unsigned int i) noexcept; static int GetActorMpNum(unsigned int i) noexcept;