1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-21 14:02:59 +01:00

Synchronise reset_0x69EBE4 over network

Clients calling reset_0x69EBE4 not in sync is a major cause of desyncs,
this change tries to force sync across clients
This commit is contained in:
Michał Janiszewski
2016-05-31 09:06:07 +02:00
parent c004b986ae
commit 4955279b7b
8 changed files with 23 additions and 8 deletions

View File

@@ -1477,6 +1477,9 @@ void Network::Server_Client_Joined(const char* name, const std::string &keyhash,
format_string(text, STR_MULTIPLAYER_PLAYER_HAS_JOINED_THE_GAME, &player_name);
chat_history_add(text);
Server_Send_MAP(&connection);
// This is needed to synchronise calls to reset sprite order across clients,
// otherwise connected clients will fall out of sync in simulation.
game_do_command(0, GAME_COMMAND_FLAG_APPLY, 0, 0, GAME_COMMAND_RESET_SPRITES, 0, 0);
gNetwork.Server_Send_EVENT_PLAYER_JOINED(player_name);
Server_Send_GROUPLIST(connection);
Server_Send_PLAYERLIST();