equal
deleted
inserted
replaced
1299 _network_player_info[p->index].performance = p->old_economy[0].performance_history; |
1299 _network_player_info[p->index].performance = p->old_economy[0].performance_history; |
1300 } |
1300 } |
1301 |
1301 |
1302 // Go through all vehicles and count the type of vehicles |
1302 // Go through all vehicles and count the type of vehicles |
1303 FOR_ALL_VEHICLES(v) { |
1303 FOR_ALL_VEHICLES(v) { |
1304 if (!IsValidPlayer(v->owner)) continue; |
1304 if (!IsValidPlayer(v->owner) || !v->IsPrimaryVehicle()) continue; |
1305 byte type = 0; |
1305 byte type = 0; |
1306 switch (v->type) { |
1306 switch (v->type) { |
1307 case VEH_TRAIN: type = 0; break; |
1307 case VEH_TRAIN: type = 0; break; |
1308 case VEH_ROAD: type = (v->cargo_type != CT_PASSENGERS) ? 1 : 2; break; |
1308 case VEH_ROAD: type = (v->cargo_type != CT_PASSENGERS) ? 1 : 2; break; |
1309 case VEH_AIRCRAFT: type = 3; break; |
1309 case VEH_AIRCRAFT: type = 3; break; |
1310 case VEH_SHIP: type = 4; break; |
1310 case VEH_SHIP: type = 4; break; |
1311 default: continue; |
1311 default: continue; |
1312 } |
1312 } |
1313 if (IsEngineCountable(v)) _network_player_info[v->owner].num_vehicle[type]++; |
1313 _network_player_info[v->owner].num_vehicle[type]++; |
1314 } |
1314 } |
1315 |
1315 |
1316 // Go through all stations and count the types of stations |
1316 // Go through all stations and count the types of stations |
1317 FOR_ALL_STATIONS(s) { |
1317 FOR_ALL_STATIONS(s) { |
1318 if (IsValidPlayer(s->owner)) { |
1318 if (IsValidPlayer(s->owner)) { |