(svn r1246) -Fix: [ 1090099 ] Company-messages did crash the game, because

company-index was sent, which should have been the client-index
This commit is contained in:
truelight
2004-12-23 13:53:05 +00:00
parent 533e7a97ef
commit a14a78de34
2 changed files with 3 additions and 1 deletions

View File

@@ -619,6 +619,8 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_CHAT)
case NETWORK_ACTION_CHAT_PLAYER:
case NETWORK_ACTION_GIVE_MONEY:
/* For speak to player or give money, we need the player-name */
if (ci_to->client_playas > MAX_PLAYERS)
return NETWORK_RECV_STATUS_OKAY; // This should never happen
GetString(name, DEREF_PLAYER(ci_to->client_playas-1)->name_1);
ci = NetworkFindClientInfoFromIndex(_network_own_client_index);
break;