(svn r6828) -Fix: Properly fix r6842

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
Darkvater 18 years ago
parent b1fb27dc2e
commit 7c99e38c60

@ -2328,12 +2328,12 @@ static void MainWindowWndProc(Window *w, WindowEvent *e)
#ifdef ENABLE_NETWORK #ifdef ENABLE_NETWORK
case WKC_RETURN: case 'T': // smart chat; send to team if any, otherwise to all case WKC_RETURN: case 'T': // smart chat; send to team if any, otherwise to all
if (_networking) { if (_networking) {
const NetworkClientInfo *ci = NULL;
const NetworkClientInfo *cio = NetworkFindClientInfoFromIndex(_network_own_client_index); const NetworkClientInfo *cio = NetworkFindClientInfoFromIndex(_network_own_client_index);
bool has_team = false; bool has_team = false;
/* Only players actually playing can speak to team. Eg spectators cannot */ /* Only players actually playing can speak to team. Eg spectators cannot */
if (IsValidPlayer(cio->client_playas)) { if (IsValidPlayer(cio->client_playas)) {
const NetworkClientInfo *ci;
FOR_ALL_ACTIVE_CLIENT_INFOS(ci) { FOR_ALL_ACTIVE_CLIENT_INFOS(ci) {
if (ci->client_playas == cio->client_playas && ci != cio) { if (ci->client_playas == cio->client_playas && ci != cio) {
has_team = true; has_team = true;
@ -2342,7 +2342,7 @@ static void MainWindowWndProc(Window *w, WindowEvent *e)
} }
} }
ShowNetworkChatQueryWindow(has_team ? DESTTYPE_PLAYER : DESTTYPE_BROADCAST, ci->client_playas); ShowNetworkChatQueryWindow(has_team ? DESTTYPE_PLAYER : DESTTYPE_BROADCAST, cio->client_playas);
break; break;
} }
break; break;

Loading…
Cancel
Save