(svn r22693) -Fix [FS#4691]: The override managers were not reset in some cases like creating a new scenario.

This commit is contained in:
frosch
2011-07-29 22:23:17 +00:00
parent 793ec45a73
commit c9e920f1eb
5 changed files with 18 additions and 18 deletions

View File

@@ -7432,6 +7432,20 @@ void ResetNewGRFData()
_spritegroup_pool.CleanPool();
}
/**
* Reset NewGRF data which is stored persistently in savegames.
*/
void ResetPersistentNewGRFData()
{
/* Reset override managers */
_engine_mngr.ResetToDefaultMapping();
_house_mngr.ResetMapping();
_industry_mngr.ResetMapping();
_industile_mngr.ResetMapping();
_airport_mngr.ResetMapping();
_airporttile_mngr.ResetMapping();
}
static void BuildCargoTranslationMap()
{
memset(_cur_grffile->cargo_map, 0xFF, sizeof(_cur_grffile->cargo_map));