From 9d54e51ef995d2f2d65b12f74ce31cbcbf8848a1 Mon Sep 17 00:00:00 2001 From: celestar Date: Thu, 2 Mar 2006 08:55:12 +0000 Subject: (svn r3730) Multistop modifications: -Codechange: Completely rewritten the slot assignment system. It now consumes less CPU cycles and memory -Codechange: Increased maximum number of roadstops to 16. -Fix: Several conditions where a slot becomes unliked from a vehicle -Codechange: ClearSlot now only takes one parameter, the vehicle -Feature: Console command 'clearslots' to clear ALL currently assinged slots. debug usage only -Feature: vehicles that cannot get a slot now wait on the road instead of planlessly blocking stops or circling around -Codechange: Adjusted debug levels TODO: Make the slot finder compatible with (a) pathfinder(s). --- station.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'station.h') diff --git a/station.h b/station.h index 54b8a6141..9e3321a54 100644 --- a/station.h +++ b/station.h @@ -29,7 +29,7 @@ typedef enum RoadStopType { enum { INVALID_STATION = 0xFFFF, NUM_SLOTS = 2, - ROAD_STOP_LIMIT = 8, + ROAD_STOP_LIMIT = 16, }; typedef uint16 StationID; @@ -202,8 +202,9 @@ static inline RoadStopType GetRoadStopType(TileIndex tile) } RoadStop * GetPrimaryRoadStop(const Station *st, RoadStopType type); +uint GetNumRoadStops(const Station* st, RoadStopType type); RoadStop * AllocateRoadStop( void ); -void ClearSlot(Vehicle *v, RoadStop *rs); +void ClearSlot(Vehicle *v); static inline bool IsTrainStationTile(TileIndex tile) { -- cgit v1.2.3-54-g00ecf