Merge branch 'master' into jgrpp
# Conflicts: # src/base_station_base.h # src/newgrf_roadstop.cpp # src/newgrf_station.cpp # src/object_gui.cpp # src/saveload/settings_sl.cpp # src/saveload/station_sl.cpp # src/settings.cpp # src/settings_internal.h # src/timer/timer_game_calendar.cpp
This commit is contained in:
@@ -82,7 +82,7 @@ uint32_t RoadStopScopeResolver::GetNearbyRoadStopsInfo(uint32_t parameter, RoadS
|
||||
|
||||
uint16_t localidx = 0;
|
||||
if (IsCustomRoadStopSpecIndex(nearby_tile)) {
|
||||
const RoadStopSpecList ssl = BaseStation::GetByTile(nearby_tile)->roadstop_speclist[GetCustomRoadStopSpecIndex(nearby_tile)];
|
||||
const RoadStopSpecList &ssl = BaseStation::GetByTile(nearby_tile)->roadstop_speclist[GetCustomRoadStopSpecIndex(nearby_tile)];
|
||||
localidx = ssl.localidx;
|
||||
res |= 1 << (ssl.grfid != grfid ? 9 : 8);
|
||||
}
|
||||
@@ -215,8 +215,8 @@ uint32_t RoadStopScopeResolver::GetVariable(uint16_t variable, uint32_t paramete
|
||||
if (!IsAnyRoadStopTile(nearby_tile)) return 0xFFFFFFFF;
|
||||
if (!IsCustomRoadStopSpecIndex(nearby_tile)) return 0;
|
||||
|
||||
const RoadStopSpecList ssl = BaseStation::GetByTile(nearby_tile)->roadstop_speclist[GetCustomRoadStopSpecIndex(nearby_tile)];
|
||||
return ssl.grfid;
|
||||
const RoadStopSpecList &sm = BaseStation::GetByTile(nearby_tile)->roadstop_speclist[GetCustomRoadStopSpecIndex(nearby_tile)];
|
||||
return sm.grfid;
|
||||
}
|
||||
|
||||
/* 16 bit road stop ID of nearby tiles */
|
||||
@@ -228,9 +228,9 @@ uint32_t RoadStopScopeResolver::GetVariable(uint16_t variable, uint32_t paramete
|
||||
|
||||
uint32_t grfid = this->st->roadstop_speclist[GetCustomRoadStopSpecIndex(this->tile)].grfid;
|
||||
|
||||
const RoadStopSpecList ssl = BaseStation::GetByTile(nearby_tile)->roadstop_speclist[GetCustomRoadStopSpecIndex(nearby_tile)];
|
||||
if (ssl.grfid == grfid) {
|
||||
return ssl.localidx;
|
||||
const RoadStopSpecList &sm = BaseStation::GetByTile(nearby_tile)->roadstop_speclist[GetCustomRoadStopSpecIndex(nearby_tile)];
|
||||
if (sm.grfid == grfid) {
|
||||
return sm.localidx;
|
||||
}
|
||||
|
||||
return 0xFFFE;
|
||||
@@ -689,12 +689,10 @@ void StationUpdateRoadStopCachedTriggers(BaseStation *st)
|
||||
|
||||
/* Combine animation trigger bitmask for all road stop specs
|
||||
* of this station. */
|
||||
for (uint i = 0; i < st->roadstop_speclist.size(); i++) {
|
||||
const RoadStopSpec *ss = st->roadstop_speclist[i].spec;
|
||||
if (ss != nullptr) {
|
||||
st->cached_roadstop_anim_triggers |= ss->animation.triggers;
|
||||
st->cached_roadstop_cargo_triggers |= ss->cargo_triggers;
|
||||
}
|
||||
for (const auto &sm : GetStationSpecList<RoadStopSpec>(st)) {
|
||||
if (sm.spec == nullptr) continue;
|
||||
st->cached_roadstop_anim_triggers |= sm.spec->animation.triggers;
|
||||
st->cached_roadstop_cargo_triggers |= sm.spec->cargo_triggers;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user