mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-09 19:10:38 +00:00
Fix #301: Network server local company change on load did not update network state
This commit is contained in:
parent
2fc35aed2f
commit
8c9dd75b5b
@ -1251,7 +1251,11 @@ void SwitchToMode(SwitchMode new_mode)
|
|||||||
}
|
}
|
||||||
/* Update the local company for a loaded game. It is either always
|
/* Update the local company for a loaded game. It is either always
|
||||||
* a company or in the case of a dedicated server a spectator */
|
* a company or in the case of a dedicated server a spectator */
|
||||||
SetLocalCompany(_network_dedicated ? COMPANY_SPECTATOR : GetDefaultLocalCompany());
|
if (_network_server && !_network_dedicated) {
|
||||||
|
NetworkServerDoMove(CLIENT_ID_SERVER, GetDefaultLocalCompany());
|
||||||
|
} else {
|
||||||
|
SetLocalCompany(_network_dedicated ? COMPANY_SPECTATOR : GetDefaultLocalCompany());
|
||||||
|
}
|
||||||
if (_ctrl_pressed && !_network_dedicated) {
|
if (_ctrl_pressed && !_network_dedicated) {
|
||||||
DoCommandP(0, PM_PAUSED_NORMAL, 1, CMD_PAUSE);
|
DoCommandP(0, PM_PAUSED_NORMAL, 1, CMD_PAUSE);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user