mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-24 04:34:16 +01:00
Codechange: Replace bitstuffed VehicleEnterTileStatus. (#14027)
VehicleEnterTileStatus was an bitset-style enum, but bitstuffed with a StationID. However the StationID part was only used by trains, and only in two locations. Instead, return just the enum bitset. The two places which require the StationID just call GetStationIndex() directly.
This commit is contained in:
@@ -1837,9 +1837,9 @@ Direction GetDirectionTowards(const Vehicle *v, int x, int y)
|
||||
* @param x X position
|
||||
* @param y Y position
|
||||
* @return Some meta-data over the to be entered tile.
|
||||
* @see VehicleEnterTileStatus to see what the bits in the return value mean.
|
||||
* @see VehicleEnterTileStates to see what the bits in the return value mean.
|
||||
*/
|
||||
VehicleEnterTileStatus VehicleEnterTile(Vehicle *v, TileIndex tile, int x, int y)
|
||||
VehicleEnterTileStates VehicleEnterTile(Vehicle *v, TileIndex tile, int x, int y)
|
||||
{
|
||||
return _tile_type_procs[GetTileType(tile)]->vehicle_enter_tile_proc(v, tile, x, y);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user