summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-02-13 10:26:53 +0000
committerrubidium <rubidium@openttd.org>2007-02-13 10:26:53 +0000
commiteb5648f38206e98b03aa3ca5783faafdde390884 (patch)
treea8d30d13565c6ebb15b7a0857e33c317d033e666 /src/station_cmd.cpp
parent3f74dbe5c075610637ec10a0b077a0a8710fd610 (diff)
downloadopenttd-eb5648f38206e98b03aa3ca5783faafdde390884.tar.xz
(svn r8698) -Codechange: enumify the returns of VehicleEnterTile
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r--src/station_cmd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 2e3ae49c6..d994aa7ee 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -2260,7 +2260,7 @@ static uint32 VehicleEnter_Station(Vehicle *v, TileIndex tile, int x, int y)
if (DiagDirToAxis(dir) != AXIS_X) intswap(x, y);
if (y == TILE_SIZE / 2) {
if (dir != DIAGDIR_SE && dir != DIAGDIR_SW) x = TILE_SIZE - 1 - x;
- if (x == 12) return 2 | (station_id << 8); /* enter station */
+ if (x == 12) return VETSB_ENTERED_STATION | (station_id << VETS_STATION_ID_OFFSET); /* enter station */
if (x < 12) {
uint16 spd;
@@ -2279,7 +2279,7 @@ static uint32 VehicleEnter_Station(Vehicle *v, TileIndex tile, int x, int y)
RoadStop *rs = GetRoadStopByTile(tile, GetRoadStopType(tile));
/* Check if station is busy or if there are no free bays. */
- if (rs->IsEntranceBusy() || !rs->HasFreeBay()) return 8;
+ if (rs->IsEntranceBusy() || !rs->HasFreeBay()) return VETSB_CANNOT_ENTER;
v->u.road.state += 32;
@@ -2293,7 +2293,7 @@ static uint32 VehicleEnter_Station(Vehicle *v, TileIndex tile, int x, int y)
}
}
- return 0;
+ return VETSB_CONTINUE;
}
/* this function is called for one station each tick */