summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2008-01-18 21:25:18 +0000
committerglx <glx@openttd.org>2008-01-18 21:25:18 +0000
commit600046f3d7be00e0daa727ecf5fa9886b2d59522 (patch)
treee8298e1b72b296eec47a1a5635803ae0bb228a78 /src
parentb6d0684826b8562d0dd602596bd391611aea49b5 (diff)
downloadopenttd-600046f3d7be00e0daa727ecf5fa9886b2d59522.tar.xz
(svn r11920) -Fix (r11844): train count was incorrect in network lobby window (and 'players' command)
Diffstat (limited to 'src')
-rw-r--r--src/network/network_server.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp
index 24cc3aefe..29b21fc47 100644
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -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