Fix road stop road/tram type variables when not present and in GUI

This commit is contained in:
Jonathan G Rennison
2022-02-16 19:03:41 +00:00
parent a0e6380d7a
commit 650a359a16
5 changed files with 32 additions and 18 deletions

View File

@@ -97,7 +97,7 @@ static bool IsRoadStopAvailable(const RoadStopSpec *roadstopspec, StationType ty
{
if (roadstopspec == nullptr || !HasBit(roadstopspec->callback_mask, CBM_ROAD_STOP_AVAIL)) return true;
uint16 cb_res = GetRoadStopCallback(CBID_STATION_AVAILABILITY, 0, 0, roadstopspec, nullptr, INVALID_TILE, GetRoadTypeInfo(_cur_roadtype), type, 0);
uint16 cb_res = GetRoadStopCallback(CBID_STATION_AVAILABILITY, 0, 0, roadstopspec, nullptr, INVALID_TILE, _cur_roadtype, type, 0);
if (cb_res == CALLBACK_FAILED) return true;
return Convert8bitBooleanCallback(roadstopspec->grf_prop.grffile, CBID_STATION_AVAILABILITY, cb_res);