equal
deleted
inserted
replaced
511 |
511 |
512 // Say we received the map and loaded it correctly! |
512 // Say we received the map and loaded it correctly! |
513 SEND_COMMAND(PACKET_CLIENT_MAP_OK)(); |
513 SEND_COMMAND(PACKET_CLIENT_MAP_OK)(); |
514 |
514 |
515 if (_network_playas == 0 || _network_playas > MAX_PLAYERS || |
515 if (_network_playas == 0 || _network_playas > MAX_PLAYERS || |
516 !DEREF_PLAYER(_network_playas - 1)->is_active) { |
516 !GetPlayer(_network_playas - 1)->is_active) { |
517 |
517 |
518 if (_network_playas == OWNER_SPECTATOR) { |
518 if (_network_playas == OWNER_SPECTATOR) { |
519 // The client wants to be a spectator.. |
519 // The client wants to be a spectator.. |
520 _local_player = OWNER_SPECTATOR; |
520 _local_player = OWNER_SPECTATOR; |
521 DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0); |
521 DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0); |
630 case NETWORK_ACTION_CHAT_PLAYER: |
630 case NETWORK_ACTION_CHAT_PLAYER: |
631 case NETWORK_ACTION_GIVE_MONEY: |
631 case NETWORK_ACTION_GIVE_MONEY: |
632 /* For speak to player or give money, we need the player-name */ |
632 /* For speak to player or give money, we need the player-name */ |
633 if (ci_to->client_playas > MAX_PLAYERS) |
633 if (ci_to->client_playas > MAX_PLAYERS) |
634 return NETWORK_RECV_STATUS_OKAY; // This should never happen |
634 return NETWORK_RECV_STATUS_OKAY; // This should never happen |
635 GetString(name, DEREF_PLAYER(ci_to->client_playas-1)->name_1); |
635 GetString(name, GetPlayer(ci_to->client_playas-1)->name_1); |
636 ci = NetworkFindClientInfoFromIndex(_network_own_client_index); |
636 ci = NetworkFindClientInfoFromIndex(_network_own_client_index); |
637 break; |
637 break; |
638 default: |
638 default: |
639 /* This should never happen */ |
639 /* This should never happen */ |
640 NOT_REACHED(); |
640 NOT_REACHED(); |