diff options
author | rubidium <rubidium@openttd.org> | 2008-12-22 21:15:02 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-12-22 21:15:02 +0000 |
commit | 5b7cd460e9b75838de5732a56a01ad6311356cb3 (patch) | |
tree | 6a54ea9e5c67b1b74f443bacaae9ba48deb5a787 /src/main_gui.cpp | |
parent | a68766744802ea1c895e9b09f04f966bf71581fa (diff) | |
download | openttd-5b7cd460e9b75838de5732a56a01ad6311356cb3.tar.xz |
(svn r14715) -Codechange: move some network code from the main gui file into one of the the network files.
Diffstat (limited to 'src/main_gui.cpp')
-rw-r--r-- | src/main_gui.cpp | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/main_gui.cpp b/src/main_gui.cpp index ffa2b7feb..1befb36e7 100644 --- a/src/main_gui.cpp +++ b/src/main_gui.cpp @@ -317,22 +317,9 @@ struct MainWindow : Window case WKC_RETURN: case 'T': // smart chat; send to team if any, otherwise to all if (_networking) { const NetworkClientInfo *cio = NetworkFindClientInfoFromIndex(_network_own_client_id); - bool teamchat = false; - if (cio == NULL) break; - /* 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) { - teamchat = true; - break; - } - } - } - - ShowNetworkChatQueryWindow(teamchat ? DESTTYPE_TEAM : DESTTYPE_BROADCAST, cio->client_playas); + ShowNetworkChatQueryWindow(NetworkClientPreferTeamChat(cio) ? DESTTYPE_TEAM : DESTTYPE_BROADCAST, cio->client_playas); } break; |