Fix: Var68 for station and roadstop was broken (#10784)

pull/532/head
kiwitreekor 1 year ago committed by GitHub
parent 98d809c33b
commit 3375f25b70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -157,7 +157,7 @@ uint32 RoadStopScopeResolver::GetVariable(byte variable, uint32 parameter, bool
if (IsCustomRoadStopSpecIndex(nearby_tile)) {
const RoadStopSpecList ssl = BaseStation::GetByTile(nearby_tile)->roadstop_speclist[GetCustomRoadStopSpecIndex(nearby_tile)];
res |= 1 << (ssl.grfid != grfid ? 9 : 8) | std::max<uint16_t>(ssl.localidx, 0xFF);
res |= 1 << (ssl.grfid != grfid ? 9 : 8) | ClampTo<uint8_t>(ssl.localidx);
}
return res;
}

@ -364,7 +364,7 @@ TownScopeResolver *StationResolverObject::GetTown()
if (IsCustomStationSpecIndex(nearby_tile)) {
const StationSpecList ssl = BaseStation::GetByTile(nearby_tile)->speclist[GetCustomStationSpecIndex(nearby_tile)];
res |= 1 << (ssl.grfid != grfid ? 9 : 8) | std::max<uint16_t>(ssl.localidx, 0xFF);
res |= 1 << (ssl.grfid != grfid ? 9 : 8) | ClampTo<uint8_t>(ssl.localidx);
}
return res;
}

Loading…
Cancel
Save