summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-11-05 20:26:13 +0000
committerfrosch <frosch@openttd.org>2009-11-05 20:26:13 +0000
commitb012a75c47e7de641db9a551b0244f431efe7db0 (patch)
treec03f4ae583abb17423b585a5421536d85011fb3a /src
parent79627b4f8952da6a6d6132d9428ce037aeaae9df (diff)
downloadopenttd-b012a75c47e7de641db9a551b0244f431efe7db0.tar.xz
(svn r17977) -Fix: Busses and trucks are distinguished by cargo class.
Diffstat (limited to 'src')
-rw-r--r--src/network/network_server.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp
index 7a3ec4cb4..887b6da72 100644
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -29,6 +29,7 @@
#include "../company_gui.h"
#include "../window_func.h"
#include "../openttd.h"
+#include "../cargotype.h"
#include "table/strings.h"
@@ -1380,7 +1381,7 @@ void NetworkPopulateCompanyStats(NetworkCompanyStats *stats)
byte type = 0;
switch (v->type) {
case VEH_TRAIN: type = 0; break;
- case VEH_ROAD: type = (v->cargo_type != CT_PASSENGERS) ? 1 : 2; break;
+ case VEH_ROAD: type = IsCargoInClass(v->cargo_type, CC_PASSENGERS) ? 2 : 1; break;
case VEH_AIRCRAFT: type = 3; break;
case VEH_SHIP: type = 4; break;
default: continue;