(svn r5101) Add a function to convert an axis and a flag for north/south into a DiagDirection. Use it for bridge ramps and ship depots

This commit is contained in:
tron
2006-06-04 16:04:15 +00:00
parent f1be69c47b
commit 3cb526d0d9
5 changed files with 23 additions and 19 deletions

View File

@@ -1989,7 +1989,7 @@ Trackdir GetVehicleTrackdir(const Vehicle* v)
case VEH_Ship:
if (v->u.ship.state == 0x80) /* Inside a depot? */
/* We'll assume the ship is facing outwards */
return DiagdirToDiagTrackdir(GetDepotDirection(v->tile, TRANSPORT_WATER)); /* Ship in depot */
return DiagdirToDiagTrackdir(GetShipDepotDirection(v->tile));
return TrackDirectionToTrackdir(FIND_FIRST_BIT(v->u.ship.state),v->direction);