1294 if (_network_own_client_index != ci->client_index) { |
1294 if (_network_own_client_index != ci->client_index) { |
1295 GetString(this->action[i], STR_NETWORK_CLIENTLIST_SPEAK_TO_CLIENT, lastof(this->action[i])); |
1295 GetString(this->action[i], STR_NETWORK_CLIENTLIST_SPEAK_TO_CLIENT, lastof(this->action[i])); |
1296 this->proc[i++] = &ClientList_SpeakToClient; |
1296 this->proc[i++] = &ClientList_SpeakToClient; |
1297 } |
1297 } |
1298 |
1298 |
1299 if (IsValidPlayer(ci->client_playas) || ci->client_playas == PLAYER_SPECTATOR) { |
1299 if (IsValidPlayerID(ci->client_playas) || ci->client_playas == PLAYER_SPECTATOR) { |
1300 GetString(this->action[i], STR_NETWORK_CLIENTLIST_SPEAK_TO_COMPANY, lastof(this->action[i])); |
1300 GetString(this->action[i], STR_NETWORK_CLIENTLIST_SPEAK_TO_COMPANY, lastof(this->action[i])); |
1301 this->proc[i++] = &ClientList_SpeakToCompany; |
1301 this->proc[i++] = &ClientList_SpeakToCompany; |
1302 } |
1302 } |
1303 GetString(this->action[i], STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL, lastof(this->action[i])); |
1303 GetString(this->action[i], STR_NETWORK_CLIENTLIST_SPEAK_TO_ALL, lastof(this->action[i])); |
1304 this->proc[i++] = &ClientList_SpeakToAll; |
1304 this->proc[i++] = &ClientList_SpeakToAll; |
1305 |
1305 |
1306 if (_network_own_client_index != ci->client_index) { |
1306 if (_network_own_client_index != ci->client_index) { |
1307 /* We are no spectator and the player we want to give money to is no spectator and money gifts are allowed */ |
1307 /* We are no spectator and the player we want to give money to is no spectator and money gifts are allowed */ |
1308 if (IsValidPlayer(_network_playas) && IsValidPlayer(ci->client_playas) && _settings_game.economy.give_money) { |
1308 if (IsValidPlayerID(_network_playas) && IsValidPlayerID(ci->client_playas) && _settings_game.economy.give_money) { |
1309 GetString(this->action[i], STR_NETWORK_CLIENTLIST_GIVE_MONEY, lastof(this->action[i])); |
1309 GetString(this->action[i], STR_NETWORK_CLIENTLIST_GIVE_MONEY, lastof(this->action[i])); |
1310 this->proc[i++] = &ClientList_GiveMoney; |
1310 this->proc[i++] = &ClientList_GiveMoney; |
1311 } |
1311 } |
1312 } |
1312 } |
1313 |
1313 |
1492 } else { |
1492 } else { |
1493 DrawString(4, y, STR_NETWORK_CLIENT, colour); |
1493 DrawString(4, y, STR_NETWORK_CLIENT, colour); |
1494 } |
1494 } |
1495 |
1495 |
1496 /* Filter out spectators */ |
1496 /* Filter out spectators */ |
1497 if (IsValidPlayer(ci->client_playas)) DrawPlayerIcon(ci->client_playas, 64, y + 1); |
1497 if (IsValidPlayerID(ci->client_playas)) DrawPlayerIcon(ci->client_playas, 64, y + 1); |
1498 |
1498 |
1499 DoDrawString(ci->client_name, 81, y, colour); |
1499 DoDrawString(ci->client_name, 81, y, colour); |
1500 |
1500 |
1501 y += CLNWND_ROWSIZE; |
1501 y += CLNWND_ROWSIZE; |
1502 } |
1502 } |