# HG changeset patch # User belugas # Date 1191373074 0 # Node ID 8e15b94334b53089c3fcbd9793819c86ea352b9a # Parent 1e10c2d0811c43cb3d3a8cca36a2ec0ead7ff254 (svn r11197) -Fix: It is not useful to reset the override of an entity every time a new grf file is been submitted. Since newhouses showed the way to newindustries(meaning I copied/adapted a lot of code and processes from it), the behaviour was there for newhouses too. diff -r 1e10c2d0811c -r 8e15b94334b5 src/industry_cmd.cpp --- a/src/industry_cmd.cpp Tue Oct 02 20:20:14 2007 +0000 +++ b/src/industry_cmd.cpp Wed Oct 03 00:57:54 2007 +0000 @@ -71,6 +71,10 @@ 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 -r 1e10c2d0811c -r 8e15b94334b5 src/newgrf.cpp --- a/src/newgrf.cpp Tue Oct 02 20:20:14 2007 +0000 +++ b/src/newgrf.cpp Wed Oct 03 00:57:54 2007 +0000 @@ -1206,9 +1206,6 @@ /* Allocate house specs if they haven't been allocated already. */ if (_cur_grffile->housespec == NULL) { _cur_grffile->housespec = CallocT(HOUSE_MAX); - - /* Reset any overrides that have been set. */ - _house_mngr.ResetOverride(); } for (int i = 0; i < numinfo; i++) { @@ -1715,9 +1712,6 @@ /* Allocate industry tile specs if they haven't been allocated already. */ if (_cur_grffile->indtspec == NULL) { _cur_grffile->indtspec = CallocT(NUM_INDUSTRYTILES); - - /* Reset any overrides that have been set. */ - _industile_mngr.ResetOverride(); } for (int i = 0; i < numinfo; i++) { @@ -1826,9 +1820,6 @@ /* Allocate industry specs if they haven't been allocated already. */ if (_cur_grffile->industryspec == NULL) { _cur_grffile->industryspec = CallocT(NUM_INDUSTRYTYPES); - - /* Reset any overrides that have been set. */ - _industry_mngr.ResetOverride(); } for (int i = 0; i < numinfo; i++) { diff -r 1e10c2d0811c -r 8e15b94334b5 src/town_cmd.cpp --- a/src/town_cmd.cpp Tue Oct 02 20:20:14 2007 +0000 +++ b/src/town_cmd.cpp Wed Oct 03 00:57:54 2007 +0000 @@ -2522,4 +2522,7 @@ { 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(); }