player_gui.c
changeset 2676 2ba71e034d97
parent 2642 cb99ff2e49a7
child 2703 edd58a233988
--- a/player_gui.c	Fri Nov 18 20:28:55 2005 +0000
+++ b/player_gui.c	Fri Nov 18 23:41:03 2005 +0000
@@ -15,6 +15,7 @@
 #include "economy.h"
 #include "network.h"
 #include "variables.h"
+#include "train.h"
 
 #ifdef ENABLE_NETWORK
 #include "network_data.h"
@@ -432,7 +433,7 @@
 	FOR_ALL_VEHICLES(v) {
 		if (v->owner == player) {
 			switch (v->type) {
-				case VEH_Train:    if (v->subtype == TS_Front_Engine) train++; break;
+				case VEH_Train:    if (IsFrontEngine(v)) train++; break;
 				case VEH_Road:     road++; break;
 				case VEH_Aircraft: if (v->subtype <= 2) air++; break;
 				case VEH_Ship:     ship++; break;