summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/industry_cmd.cpp4
-rw-r--r--src/newgrf.cpp9
-rw-r--r--src/town_cmd.cpp3
3 files changed, 7 insertions, 9 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index 2f438cfa8..8f2753228 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -71,6 +71,10 @@ void ResetIndustries()
memset(&_industry_tile_specs, 0, sizeof(_industry_tile_specs));
memcpy(&_industry_tile_specs, &_origin_industry_tile_specs, sizeof(_origin_industry_tile_specs));
+
+ /* Reset any overrides that have been set. */
+ _industile_mngr.ResetOverride();
+ _industry_mngr.ResetOverride();
}
void ResetIndustryCreationProbility(IndustryType type)
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index a3b8115a0..68c3910ee 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -1206,9 +1206,6 @@ static bool TownHouseChangeInfo(uint hid, int numinfo, int prop, byte **bufp, in
/* Allocate house specs if they haven't been allocated already. */
if (_cur_grffile->housespec == NULL) {
_cur_grffile->housespec = CallocT<HouseSpec*>(HOUSE_MAX);
-
- /* Reset any overrides that have been set. */
- _house_mngr.ResetOverride();
}
for (int i = 0; i < numinfo; i++) {
@@ -1715,9 +1712,6 @@ static bool IndustrytilesChangeInfo(uint indtid, int numinfo, int prop, byte **b
/* Allocate industry tile specs if they haven't been allocated already. */
if (_cur_grffile->indtspec == NULL) {
_cur_grffile->indtspec = CallocT<IndustryTileSpec*>(NUM_INDUSTRYTILES);
-
- /* Reset any overrides that have been set. */
- _industile_mngr.ResetOverride();
}
for (int i = 0; i < numinfo; i++) {
@@ -1826,9 +1820,6 @@ static bool IndustriesChangeInfo(uint indid, int numinfo, int prop, byte **bufp,
/* Allocate industry specs if they haven't been allocated already. */
if (_cur_grffile->industryspec == NULL) {
_cur_grffile->industryspec = CallocT<IndustrySpec*>(NUM_INDUSTRYTYPES);
-
- /* Reset any overrides that have been set. */
- _industry_mngr.ResetOverride();
}
for (int i = 0; i < numinfo; i++) {
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index c55bf8779..a79ba45dc 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -2522,4 +2522,7 @@ void ResetHouses()
{
memset(&_house_specs, 0, sizeof(_house_specs));
memcpy(&_house_specs, &_original_house_specs, sizeof(_original_house_specs));
+
+ /* Reset any overrides that have been set. */
+ _house_mngr.ResetOverride();
}