mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r13718) -Fix: possible desync on the autorenew settings 20+ game years (i.e. 4.5+ hours) after a company was started.
This commit is contained in:
parent
227085622a
commit
c2d2f817de
|
@ -866,18 +866,21 @@ CommandCost CmdPlayerCtrl(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
|
|||
char *password = _settings_client.network.default_company_pass;
|
||||
NetworkChangeCompanyPassword(1, &password);
|
||||
}
|
||||
|
||||
_current_player = _local_player;
|
||||
|
||||
/* Now that we have a new player, broadcast our autorenew settings to
|
||||
* all clients so everything is in sync */
|
||||
NetworkSend_Command(0,
|
||||
(_settings_client.gui.autorenew << 15 ) | (_settings_client.gui.autorenew_months << 16) | 4,
|
||||
_settings_client.gui.autorenew_money,
|
||||
CMD_SET_AUTOREPLACE,
|
||||
NULL
|
||||
);
|
||||
|
||||
MarkWholeScreenDirty();
|
||||
}
|
||||
|
||||
/* Now that we have a new player, broadcast its autorenew settings to
|
||||
* all clients so everything is in sync */
|
||||
DoCommand(0,
|
||||
(_settings_client.gui.autorenew << 15 ) | (_settings_client.gui.autorenew_months << 16) | 4,
|
||||
_settings_client.gui.autorenew_money,
|
||||
DC_EXEC,
|
||||
CMD_SET_AUTOREPLACE
|
||||
);
|
||||
|
||||
if (_network_server) {
|
||||
/* XXX - UGLY! p2 (pid) is mis-used to fetch the client-id, done at
|
||||
* server-side in network_server.c:838, function
|
||||
|
|
Loading…
Reference in New Issue