1
0
Fork 0

Change: Adapt GetVehicleTrackdir() for ships.

pull/8480/head
Juanjo 2013-12-27 18:06:30 +00:00 committed by J0anJosep
parent f713a3525d
commit ea9ac51812
1 changed files with 4 additions and 3 deletions

View File

@ -290,11 +290,12 @@ Trackdir Ship::GetVehicleTrackdir() const
if (this->vehstatus & VS_CRASHED) return INVALID_TRACKDIR;
if (this->IsInDepot()) {
/* We'll assume the ship is facing outwards */
return DiagDirToDiagTrackdir(GetShipDepotDirection(this->tile));
/* Only old depots need it. */
/* We'll assume the ship is facing outwards. */
if (this->state == TRACK_BIT_DEPOT) return DiagDirToDiagTrackdir(GetShipDepotDirection(this->tile));
}
if (this->state == TRACK_BIT_WORMHOLE) {
if (this->state == TRACK_BIT_WORMHOLE || this->IsInDepot()) {
/* ship on aqueduct, so just use its direction and assume a diagonal track */
return DiagDirToDiagTrackdir(DirToDiagDir(this->direction));
}