forked from teamnwah/openmw-tes3coop
Update position before sending cell packet
This commit is contained in:
parent
1ee2458f6e
commit
01af4f3bbc
2 changed files with 3 additions and 3 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue