mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
Add: [NewGRF] Extended custom waypoint classes. (#12653)
This allows waypoints to be split into categories just like stations, instead of all being lumped together.
Station class labels with the first byte set to 0xFF will be treated in the same way as the 'WAYP' class.
(cherry picked from commit 2c70ccb137
)
This commit is contained in:
parent
fe14fe6d3c
commit
84c6a917d8
@ -220,7 +220,7 @@ void StationUpdateRoadStopCachedTriggers(BaseStation *st);
|
||||
*/
|
||||
inline bool IsWaypointClass(const RoadStopClass &cls)
|
||||
{
|
||||
return cls.global_id == ROADSTOP_CLASS_LABEL_WAYPOINT;
|
||||
return cls.global_id == ROADSTOP_CLASS_LABEL_WAYPOINT || GB(cls.global_id, 24, 8) == UINT8_MAX;
|
||||
}
|
||||
|
||||
#endif /* NEWGRF_ROADSTATION_H */
|
||||
|
@ -220,7 +220,7 @@ inline uint16_t GetStationLayoutKey(uint8_t platforms, uint8_t length)
|
||||
*/
|
||||
inline bool IsWaypointClass(const StationClass &cls)
|
||||
{
|
||||
return cls.global_id == STATION_CLASS_LABEL_WAYPOINT;
|
||||
return cls.global_id == STATION_CLASS_LABEL_WAYPOINT || GB(cls.global_id, 24, 8) == UINT8_MAX;
|
||||
}
|
||||
|
||||
/* Evaluate a tile's position within a station, and return the result a bitstuffed format. */
|
||||
|
Loading…
Reference in New Issue
Block a user