diff --git a/apps/openmw-mp/Script/Functions/Translocations.cpp b/apps/openmw-mp/Script/Functions/Translocations.cpp index 459a7afb7..704801ef2 100644 --- a/apps/openmw-mp/Script/Functions/Translocations.cpp +++ b/apps/openmw-mp/Script/Functions/Translocations.cpp @@ -86,7 +86,6 @@ const char* TranslocationFunctions::GetCell(unsigned short pid) noexcept Player *player; GET_PLAYER(pid, player, 0); - return player->GetCell()->mName.c_str(); } diff --git a/apps/openmw/mwmp/LocalPlayer.cpp b/apps/openmw/mwmp/LocalPlayer.cpp index a8c387c00..d7e0a6fef 100644 --- a/apps/openmw/mwmp/LocalPlayer.cpp +++ b/apps/openmw/mwmp/LocalPlayer.cpp @@ -438,12 +438,13 @@ void LocalPlayer::updateCell(bool forceUpdate) (*GetCell()) = *_cell; isExterior = _cell->isExterior(); + + // Make sure the position is updated before a cell packet is sent + updatePosition(true); RakNet::BitStream bs; GetNetworking()->GetPacket((RakNet::MessageID) ID_GAME_CELL)->Packet(&bs, this, true); GetNetworking()->SendData(&bs); - - updatePosition(true); } }