equal
deleted
inserted
replaced
106 p->Send_uint64(_network_player_info[player->index].income); |
106 p->Send_uint64(_network_player_info[player->index].income); |
107 p->Send_uint16(_network_player_info[player->index].performance); |
107 p->Send_uint16(_network_player_info[player->index].performance); |
108 |
108 |
109 /* Send 1 if there is a passord for the company else send 0 */ |
109 /* Send 1 if there is a passord for the company else send 0 */ |
110 p->Send_bool(!StrEmpty(_network_player_info[player->index].password)); |
110 p->Send_bool(!StrEmpty(_network_player_info[player->index].password)); |
|
111 p->Send_bool(_network_player_info[player->index].ai); |
111 |
112 |
112 for (i = 0; i < NETWORK_VEHICLE_TYPES; i++) { |
113 for (i = 0; i < NETWORK_VEHICLE_TYPES; i++) { |
113 p->Send_uint16(_network_player_info[player->index].num_vehicle[i]); |
114 p->Send_uint16(_network_player_info[player->index].num_vehicle[i]); |
114 } |
115 } |
115 |
116 |
677 SEND_COMMAND(PACKET_SERVER_ERROR)(cs, NETWORK_ERROR_FULL); |
678 SEND_COMMAND(PACKET_SERVER_ERROR)(cs, NETWORK_ERROR_FULL); |
678 return; |
679 return; |
679 } |
680 } |
680 break; |
681 break; |
681 default: /* Join another company (companies 1-8 (index 0-7)) */ |
682 default: /* Join another company (companies 1-8 (index 0-7)) */ |
682 if (!IsValidPlayer(playas)) { |
683 if (!IsValidPlayer(playas) || !IsHumanPlayer(playas)) { |
683 SEND_COMMAND(PACKET_SERVER_ERROR)(cs, NETWORK_ERROR_PLAYER_MISMATCH); |
684 SEND_COMMAND(PACKET_SERVER_ERROR)(cs, NETWORK_ERROR_PLAYER_MISMATCH); |
684 return; |
685 return; |
685 } |
686 } |
686 break; |
687 break; |
687 } |
688 } |
1333 // Set some general stuff |
1334 // Set some general stuff |
1334 _network_player_info[p->index].inaugurated_year = p->inaugurated_year; |
1335 _network_player_info[p->index].inaugurated_year = p->inaugurated_year; |
1335 _network_player_info[p->index].company_value = p->old_economy[0].company_value; |
1336 _network_player_info[p->index].company_value = p->old_economy[0].company_value; |
1336 _network_player_info[p->index].money = p->player_money; |
1337 _network_player_info[p->index].money = p->player_money; |
1337 _network_player_info[p->index].performance = p->old_economy[0].performance_history; |
1338 _network_player_info[p->index].performance = p->old_economy[0].performance_history; |
|
1339 _network_player_info[p->index].ai = p->is_ai; |
1338 } |
1340 } |
1339 |
1341 |
1340 // Go through all vehicles and count the type of vehicles |
1342 // Go through all vehicles and count the type of vehicles |
1341 FOR_ALL_VEHICLES(v) { |
1343 FOR_ALL_VEHICLES(v) { |
1342 if (!IsValidPlayer(v->owner) || !v->IsPrimaryVehicle()) continue; |
1344 if (!IsValidPlayer(v->owner) || !v->IsPrimaryVehicle()) continue; |