Merge branch 'master' into jgrpp
# Conflicts: # src/newgrf_station.cpp
This commit is contained in:
@@ -1889,6 +1889,12 @@ static ChangeInfoResult StationChangeInfo(uint stid, int numinfo, int prop, cons
|
||||
}
|
||||
dts->Clone(tmp_layout.data());
|
||||
}
|
||||
|
||||
/* Number of layouts must be even, alternating X and Y */
|
||||
if (statspec->renderdata.size() & 1) {
|
||||
grfmsg(1, "StationChangeInfo: Station %u defines an odd number of sprite layouts, dropping the last item", stid + i);
|
||||
statspec->renderdata.pop_back();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2011,6 +2017,12 @@ static ChangeInfoResult StationChangeInfo(uint stid, int numinfo, int prop, cons
|
||||
/* On error, bail out immediately. Temporary GRF data was already freed */
|
||||
if (ReadSpriteLayout(buf, num_building_sprites, false, GSF_STATIONS, true, false, dts)) return CIR_DISABLED;
|
||||
}
|
||||
|
||||
/* Number of layouts must be even, alternating X and Y */
|
||||
if (statspec->renderdata.size() & 1) {
|
||||
grfmsg(1, "StationChangeInfo: Station %u defines an odd number of sprite layouts, dropping the last item", stid + i);
|
||||
statspec->renderdata.pop_back();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user