Add more sub parts to road stop var 68

This commit is contained in:
Jonathan G Rennison
2022-02-24 20:36:41 +00:00
parent ad046bdf22
commit ff2640c0e3
2 changed files with 20 additions and 3 deletions

View File

@@ -151,6 +151,10 @@ uint32 RoadStopScopeResolver::GetVariable(uint16 variable, uint32 parameter, Get
bool same_orientation = GetStationGfx(this->tile) == GetStationGfx(nearby_tile);
bool same_station = GetStationIndex(nearby_tile) == this->st->index;
uint32 res = GetStationGfx(nearby_tile) << 12 | !same_orientation << 11 | !!same_station << 10;
StationType type = GetStationType(nearby_tile);
if (type == STATION_TRUCK) res |= (1 << 16);
if (type == STATION_ROADWAYPOINT) res |= (2 << 16);
if (type == this->type) SetBit(res, 20);
if (IsCustomRoadStopSpecIndex(nearby_tile)) {
const RoadStopSpecList ssl = BaseStation::GetByTile(nearby_tile)->roadstop_speclist[GetCustomRoadStopSpecIndex(nearby_tile)];