diff options
author | rubidium <rubidium@openttd.org> | 2008-12-28 14:37:19 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-12-28 14:37:19 +0000 |
commit | e83cca7d130872b9d64523ce1a0d61306bc31599 (patch) | |
tree | 36bbbb5d389d41119ee184607bc012666dda7812 /src/network/network.cpp | |
parent | 9c2c1dea067d305601650c60a67f389e090ad835 (diff) | |
download | openttd-e83cca7d130872b9d64523ce1a0d61306bc31599.tar.xz |
(svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter.
Diffstat (limited to 'src/network/network.cpp')
-rw-r--r-- | src/network/network.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/network/network.cpp b/src/network/network.cpp index fefd5cfe3..7f54ef42e 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -375,13 +375,13 @@ void CheckMinActiveClients() if (_min_active_clients_paused) return; _min_active_clients_paused = true; - DoCommandP(0, 1, 0, NULL, CMD_PAUSE); + DoCommandP(0, 1, 0, CMD_PAUSE); NetworkServerSendChat(NETWORK_ACTION_SERVER_MESSAGE, DESTTYPE_BROADCAST, 0, "Game paused (not enough players)", CLIENT_ID_SERVER); } else { if (!_min_active_clients_paused) return; _min_active_clients_paused = false; - DoCommandP(0, 0, 0, NULL, CMD_PAUSE); + DoCommandP(0, 0, 0, CMD_PAUSE); NetworkServerSendChat(NETWORK_ACTION_SERVER_MESSAGE, DESTTYPE_BROADCAST, 0, "Game unpaused (enough players)", CLIENT_ID_SERVER); } } @@ -470,7 +470,7 @@ void NetworkCloseClient(NetworkClientSocket *cs) /* When the client was PRE_ACTIVE, the server was in pause mode, so unpause */ if (cs->status == STATUS_PRE_ACTIVE && _settings_client.network.pause_on_join) { - DoCommandP(0, 0, 0, NULL, CMD_PAUSE); + DoCommandP(0, 0, 0, CMD_PAUSE); NetworkServerSendChat(NETWORK_ACTION_SERVER_MESSAGE, DESTTYPE_BROADCAST, 0, "Game unpaused", CLIENT_ID_SERVER); } @@ -1057,8 +1057,7 @@ void NetworkGameLoop() while (f != NULL && !feof(f)) { if (cp != NULL && _date == next_date && _date_fract == next_date_fract) { _current_company = cp->company; - _cmd_text = cp->text; - DoCommandP(cp->tile, cp->p1, cp->p2, NULL, cp->cmd); + DoCommandP(cp->tile, cp->p1, cp->p2, cp->cmd, NULL, cp->text); free(cp); cp = NULL; } |