Fix road stop road/tram type variables when not present and in GUI
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user