diff options
Diffstat (limited to 'src/main_gui.cpp')
-rw-r--r-- | src/main_gui.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp index 7ac736638..414088970 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp @@ -49,7 +49,7 @@ void CcGiveMoney(bool success, TileIndex tile, uint32 p1, uint32 p2) if (!success || !_settings_game.economy.give_money) return; char msg[20]; - /* Inform the player of this action */ + /* Inform the company of the action of one of it's clients (controllers). */ snprintf(msg, sizeof(msg), "%d", p1); if (!_network_server) { @@ -67,8 +67,8 @@ void HandleOnEditText(const char *str) switch (_rename_what) { #ifdef ENABLE_NETWORK case 3: { // Give money, you can only give money in excess of loan - const Player *p = GetPlayer(_current_player); - Money money = min(p->player_money - p->current_loan, (Money)(atoi(str) / _currency->rate)); + const Company *c = GetCompany(_current_company); + Money money = min(c->money - c->current_loan, (Money)(atoi(str) / _currency->rate)); uint32 money_c = Clamp(ClampToI32(money), 0, 20000000); // Clamp between 20 million and 0 @@ -118,9 +118,9 @@ void CcPlaySound10(bool success, TileIndex tile, uint32 p1, uint32 p2) } #ifdef ENABLE_NETWORK -void ShowNetworkGiveMoneyWindow(PlayerID player) +void ShowNetworkGiveMoneyWindow(CompanyID company) { - _rename_id = player; + _rename_id = company; _rename_what = 3; ShowQueryString(STR_EMPTY, STR_NETWORK_GIVE_MONEY_CAPTION, 30, 180, NULL, CS_NUMERAL, QSF_NONE); } @@ -319,8 +319,8 @@ struct MainWindow : Window if (cio == NULL) break; - /* Only players actually playing can speak to team. Eg spectators cannot */ - if (_settings_client.gui.prefer_teamchat && IsValidPlayerID(cio->client_playas)) { + /* Only companies actually playing can speak to team. Eg spectators cannot */ + if (_settings_client.gui.prefer_teamchat && IsValidCompanyID(cio->client_playas)) { const NetworkClientInfo *ci; FOR_ALL_ACTIVE_CLIENT_INFOS(ci) { if (ci->client_playas == cio->client_playas && ci != cio) { @@ -334,7 +334,7 @@ struct MainWindow : Window } break; - case WKC_SHIFT | WKC_RETURN: case WKC_SHIFT | 'T': // send text message to all players + case WKC_SHIFT | WKC_RETURN: case WKC_SHIFT | 'T': // send text message to all clients if (_networking) ShowNetworkChatQueryWindow(DESTTYPE_BROADCAST, 0); break; |