diff --git a/apps/openmw-mp/Script/Functions/Actors.cpp b/apps/openmw-mp/Script/Functions/Actors.cpp index 7d5306bd3..13a818a19 100644 --- a/apps/openmw-mp/Script/Functions/Actors.cpp +++ b/apps/openmw-mp/Script/Functions/Actors.cpp @@ -133,6 +133,16 @@ double ActorFunctions::GetActorFatigueCurrent(unsigned int i) noexcept return readActorList->baseActors.at(i).creatureStats.mDynamic[2].mCurrent; } +bool ActorFunctions::DoesActorHavePosition(unsigned int i) noexcept +{ + return readActorList->baseActors.at(i).hasPositionData; +} + +bool ActorFunctions::DoesActorHaveStatsDynamic(unsigned int i) noexcept +{ + return readActorList->baseActors.at(i).hasStatsDynamicData; +} + void ActorFunctions::SetActorListCell(const char* cellDescription) noexcept { writeActorList.cell = Utils::getCellFromDescription(cellDescription); diff --git a/apps/openmw-mp/Script/Functions/Actors.hpp b/apps/openmw-mp/Script/Functions/Actors.hpp index 43b043bf1..e1c4f41f3 100644 --- a/apps/openmw-mp/Script/Functions/Actors.hpp +++ b/apps/openmw-mp/Script/Functions/Actors.hpp @@ -28,6 +28,9 @@ {"GetActorFatigueBase", ActorFunctions::GetActorFatigueBase},\ {"GetActorFatigueCurrent", ActorFunctions::GetActorFatigueCurrent},\ \ + {"DoesActorHavePosition", ActorFunctions::DoesActorHavePosition},\ + {"DoesActorHaveStatsDynamic", ActorFunctions::DoesActorHaveStatsDynamic},\ + \ {"SetActorListCell", ActorFunctions::SetActorListCell},\ {"SetActorListAction", ActorFunctions::SetActorListAction},\ \ @@ -83,6 +86,9 @@ public: static double GetActorFatigueBase(unsigned int i) noexcept; static double GetActorFatigueCurrent(unsigned int i) noexcept; + static bool DoesActorHavePosition(unsigned int i) noexcept; + static bool DoesActorHaveStatsDynamic(unsigned int i) noexcept; + static void SetActorListCell(const char* cellDescription) noexcept; static void SetActorListAction(unsigned char action) noexcept;