summaryrefslogtreecommitdiff
path: root/vehicle.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-06-05 11:28:00 +0000
committertron <tron@openttd.org>2006-06-05 11:28:00 +0000
commitcb13a1e43d20bf376f5c360fad89dca4260fb196 (patch)
treeb887bdc9f2fd2dcd8c254caa699df752e695c501 /vehicle.c
parentb0801e4e63667a7c9a74b704c41b26ae26f52b83 (diff)
downloadopenttd-cb13a1e43d20bf376f5c360fad89dca4260fb196.tar.xz
(svn r5120) Add IsShipInDepot{Stopped,}() and remove some redundant checks
Diffstat (limited to 'vehicle.c')
-rw-r--r--vehicle.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vehicle.c b/vehicle.c
index f6a89bc3d..9f9279cec 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -4,6 +4,7 @@
#include "openttd.h"
#include "road_map.h"
#include "roadveh.h"
+#include "ship.h"
#include "spritecache.h"
#include "table/sprites.h"
#include "table/strings.h"
@@ -1990,7 +1991,7 @@ Trackdir GetVehicleTrackdir(const Vehicle* v)
return TrackDirectionToTrackdir(FIND_FIRST_BIT(v->u.rail.track),v->direction);
case VEH_Ship:
- if (v->u.ship.state == 0x80) /* Inside a depot? */
+ if (IsShipInDepot(v))
/* We'll assume the ship is facing outwards */
return DiagdirToDiagTrackdir(GetShipDepotDirection(v->tile));