summaryrefslogtreecommitdiff
path: root/station_cmd.c
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2006-03-18 08:00:27 +0000
committercelestar <celestar@openttd.org>2006-03-18 08:00:27 +0000
commite54f1e1e2b5155c56a29ac32bc852507b04b9341 (patch)
treeb33548d3513e245a98d65a5debc42aebfe66c8c7 /station_cmd.c
parent2bbcd41247d9312be1d0b685da0356ac809f2b23 (diff)
downloadopenttd-e54f1e1e2b5155c56a29ac32bc852507b04b9341.tar.xz
(svn r3939) -Fix: No longer assume that the number of slots is 2. It was not a problem up to now, but it's not The Right Thing (TM) to do either
Diffstat (limited to 'station_cmd.c')
-rw-r--r--station_cmd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/station_cmd.c b/station_cmd.c
index 4eaeb3003..567a418ff 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -86,13 +86,15 @@ static void MarkStationDirty(const Station* st)
static void InitializeRoadStop(RoadStop *road_stop, RoadStop *previous, TileIndex tile, StationID index)
{
+ int i;
road_stop->xy = tile;
road_stop->used = true;
road_stop->status = 3; //stop is free
- road_stop->slot[0] = road_stop->slot[1] = INVALID_VEHICLE;
road_stop->next = NULL;
road_stop->prev = previous;
road_stop->station = index;
+
+ for (i = 0; i < NUM_SLOTS; i++) road_stop->slot[i] = INVALID_VEHICLE;
}
RoadStop* GetPrimaryRoadStop(const Station* st, RoadStopType type)