forked from mirror/openmw-tes3mp
Use new SendCell() method in server scripts to send cell packets
This commit is contained in:
parent
5b39916894
commit
841e93d5e0
2 changed files with 12 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue