mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-11 18:10:14 +00:00
(svn r11920) -Fix (r11844): train count was incorrect in network lobby window (and 'players' command)
This commit is contained in:
parent
b6d0684826
commit
600046f3d7
@ -1301,7 +1301,7 @@ void NetworkPopulateCompanyInfo()
|
||||
|
||||
// Go through all vehicles and count the type of vehicles
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
if (!IsValidPlayer(v->owner)) continue;
|
||||
if (!IsValidPlayer(v->owner) || !v->IsPrimaryVehicle()) continue;
|
||||
byte type = 0;
|
||||
switch (v->type) {
|
||||
case VEH_TRAIN: type = 0; break;
|
||||
@ -1310,7 +1310,7 @@ void NetworkPopulateCompanyInfo()
|
||||
case VEH_SHIP: type = 4; break;
|
||||
default: continue;
|
||||
}
|
||||
if (IsEngineCountable(v)) _network_player_info[v->owner].num_vehicle[type]++;
|
||||
_network_player_info[v->owner].num_vehicle[type]++;
|
||||
}
|
||||
|
||||
// Go through all stations and count the types of stations
|
||||
|
Loading…
Reference in New Issue
Block a user