From 50ca901b40664453fe90a396577e6438fd45dc27 Mon Sep 17 00:00:00 2001 From: Darkvater Date: Sat, 27 Jan 2007 12:29:55 +0000 Subject: (svn r8428) -Codechange: Add proper names to aircraft subtypes instead of magic numbers and add a function IsNormalAircraft() which tells us whether the aircraft is in fact some flying device or a rotor/shadow. --- src/network/network_server.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/network') diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index 612a9edef..f69340afd 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -10,6 +10,7 @@ #include "network_data.h" #include "core/tcp.h" #include "../train.h" +#include "../aircraft.h" #include "../date.h" #include "table/strings.h" #include "../functions.h" @@ -1255,7 +1256,7 @@ void NetworkPopulateCompanyInfo(void) break; case VEH_Aircraft: - if (v->subtype <= 2) _network_player_info[v->owner].num_vehicle[3]++; + if (IsNormalAircraft(v)) _network_player_info[v->owner].num_vehicle[3]++; break; case VEH_Ship: -- cgit v1.2.3-70-g09d2