diff options
author | tron <tron@openttd.org> | 2006-06-05 11:28:00 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-06-05 11:28:00 +0000 |
commit | cb13a1e43d20bf376f5c360fad89dca4260fb196 (patch) | |
tree | b887bdc9f2fd2dcd8c254caa699df752e695c501 /vehicle.c | |
parent | b0801e4e63667a7c9a74b704c41b26ae26f52b83 (diff) | |
download | openttd-cb13a1e43d20bf376f5c360fad89dca4260fb196.tar.xz |
(svn r5120) Add IsShipInDepot{Stopped,}() and remove some redundant checks
Diffstat (limited to 'vehicle.c')
-rw-r--r-- | vehicle.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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)); |