diff options
author | rubidium <rubidium@openttd.org> | 2008-07-17 20:13:01 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-07-17 20:13:01 +0000 |
commit | d06529ef4d84ce90c90ed560a6b2f3525880c40e (patch) | |
tree | ca5029fca4c5aee49145e4bd3e3f0f81df8ccabc /src/console_cmds.cpp | |
parent | c2d2f817de7ec5f4afd76af2de765ac411cdf3c2 (diff) | |
download | openttd-d06529ef4d84ce90c90ed560a6b2f3525880c40e.tar.xz |
(svn r13719) -Codechange: rename IsValidPlayer to IsValidPlayerID in line with all other structs/classes that are in a pool.
Diffstat (limited to 'src/console_cmds.cpp')
-rw-r--r-- | src/console_cmds.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index 38d765ef4..c3203c637 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -608,7 +608,7 @@ DEF_CONSOLE_CMD(ConResetCompany) index = (PlayerID)(atoi(argv[1]) - 1); /* Check valid range */ - if (!IsValidPlayer(index)) { + if (!IsValidPlayerID(index)) { IConsolePrintF(CC_ERROR, "Company does not exist. Company-id must be between 1 and %d.", MAX_PLAYERS); return true; } @@ -654,7 +654,7 @@ DEF_CONSOLE_CMD(ConNetworkClients) FOR_ALL_ACTIVE_CLIENT_INFOS(ci) { IConsolePrintF(CC_INFO, "Client #%1d name: '%s' company: %1d IP: %s", ci->client_index, ci->client_name, - ci->client_playas + (IsValidPlayer(ci->client_playas) ? 1 : 0), + ci->client_playas + (IsValidPlayerID(ci->client_playas) ? 1 : 0), GetPlayerIP(ci)); } @@ -694,7 +694,7 @@ DEF_CONSOLE_CMD(ConNetworkConnect) * players are offset by one to ease up on users (eg players 1-8 not 0-7) */ if (_network_playas != PLAYER_SPECTATOR) { _network_playas--; - if (!IsValidPlayer(_network_playas)) return false; + if (!IsValidPlayerID(_network_playas)) return false; } } if (port != NULL) { @@ -1185,7 +1185,7 @@ DEF_CONSOLE_CMD(ConSayPlayer) if (argc != 3) return false; PlayerID player_id = (PlayerID)(atoi(argv[1]) - 1); - if (!IsValidPlayer(player_id) || !GetPlayer(player_id)->is_active) { + if (!IsValidPlayerID(player_id) || !GetPlayer(player_id)->is_active) { IConsolePrintF(CC_DEFAULT, "Unknown player. Player range is between 1 and %d.", MAX_PLAYERS); return true; } @@ -1224,12 +1224,12 @@ extern void HashCurrentCompanyPassword(); bool NetworkChangeCompanyPassword(byte argc, char *argv[]) { if (argc == 0) { - if (!IsValidPlayer(_local_player)) return true; // dedicated server + if (!IsValidPlayerID(_local_player)) return true; // dedicated server IConsolePrintF(CC_WARNING, "Current value for 'company_pw': %s", _network_player_info[_local_player].password); return true; } - if (!IsValidPlayer(_local_player)) { + if (!IsValidPlayerID(_local_player)) { IConsoleError("You have to own a company to make use of this command."); return false; } |