diff --git a/apps/openmw-mp/Script/Functions/Translocations.cpp b/apps/openmw-mp/Script/Functions/Translocations.cpp index 8929dfb7e..8e928629f 100644 --- a/apps/openmw-mp/Script/Functions/Translocations.cpp +++ b/apps/openmw-mp/Script/Functions/Translocations.cpp @@ -133,8 +133,6 @@ void TranslocationFunctions::SetCell(unsigned short pid, const char *name) noexc } player->GetCell()->mName = name; - - mwmp::Networking::Get().GetPlayerController()->GetPacket(ID_GAME_CELL)->Send(player, false); } void TranslocationFunctions::SetExterior(unsigned short pid, int x, int y) noexcept @@ -156,8 +154,6 @@ void TranslocationFunctions::SetExterior(unsigned short pid, int x, int y) noexc player->GetCell()->mData.mX = x; player->GetCell()->mData.mY = y; - - mwmp::Networking::Get().GetPlayerController()->GetPacket(ID_GAME_CELL)->Send(player, false); } int TranslocationFunctions::GetExteriorX(unsigned short pid) noexcept @@ -190,3 +186,11 @@ void TranslocationFunctions::SendPos(unsigned short pid) noexcept mwmp::Networking::Get().GetPlayerController()->GetPacket(ID_GAME_POS)->Send(player, false); } +void TranslocationFunctions::SendCell(unsigned short pid) noexcept +{ + Player *player; + GET_PLAYER(pid, player, ); + + mwmp::Networking::Get().GetPlayerController()->GetPacket(ID_GAME_CELL)->Send(player, false); +} + diff --git a/apps/openmw-mp/Script/Functions/Translocations.hpp b/apps/openmw-mp/Script/Functions/Translocations.hpp index ebbb7ef87..96e4bb600 100644 --- a/apps/openmw-mp/Script/Functions/Translocations.hpp +++ b/apps/openmw-mp/Script/Functions/Translocations.hpp @@ -26,9 +26,10 @@ {"SetExterior", TranslocationFunctions::SetExterior},\ {"GetExteriorX", TranslocationFunctions::GetExteriorX},\ {"GetExteriorY", TranslocationFunctions::GetExteriorY},\ - {"IsInExterior", TranslocationFunctions::IsInExterior}\ + {"IsInExterior", TranslocationFunctions::IsInExterior},\ \ - {"SendPos", TranslocationFunctions::SendPosition} + {"SendPos", TranslocationFunctions::SendPosition},\ + {"SendCell", TranslocationFunctions::SendCell} class TranslocationFunctions @@ -55,6 +56,7 @@ public: static bool IsInExterior(unsigned short pid) noexcept; static void SendPos(unsigned short pid) noexcept; + static void SendCell(unsigned short pid) noexcept; }; #endif //OPENMW_TRANSLOCATIONS_HPP