diff --git a/src/newgrf_roadstop.cpp b/src/newgrf_roadstop.cpp --- a/src/newgrf_roadstop.cpp +++ b/src/newgrf_roadstop.cpp @@ -157,7 +157,7 @@ uint32 RoadStopScopeResolver::GetVariabl 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(ssl.localidx, 0xFF); + res |= 1 << (ssl.grfid != grfid ? 9 : 8) | ClampTo(ssl.localidx); } return res; }