Changeset - r7152:399e1dced1af
[Not reviewed]
master
0 1 0
belugas - 17 years ago 2007-07-04 01:34:28
belugas@openttd.org
(svn r10426) -Codechange: Activate the reset of industry/tiles mapping upon initialization or new game.
1 file changed with 4 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/openttd.cpp
Show inline comments
 
@@ -283,12 +283,14 @@ static void ParseResolution(int res[2], 
 

	
 
static void InitializeDynamicVariables()
 
{
 
	/* Dynamic stuff needs to be initialized somewhere... */
 
	_town_sort     = NULL;
 
	_industry_sort = NULL;
 
	_industry_mngr.ResetMapping();
 
	_industile_mngr.ResetMapping();
 
}
 

	
 

	
 
static void UnInitializeGame()
 
{
 
	UnInitWindowSystem();
 
@@ -701,12 +703,14 @@ static void MakeNewGameDone()
 
static void MakeNewGame(bool from_heightmap)
 
{
 
	_game_mode = GM_NORMAL;
 

	
 
	ResetGRFConfig(true);
 
	_house_mngr.ResetMapping();
 
	_industile_mngr.ResetMapping();
 
	_industry_mngr.ResetMapping();
 

	
 
	GenerateWorldSetCallback(&MakeNewGameDone);
 
	GenerateWorld(from_heightmap ? GW_HEIGHTMAP : GW_NEWGAME, 1 << _patches.map_x, 1 << _patches.map_y);
 
}
 

	
 
static void MakeNewEditorWorldDone()
0 comments (0 inline, 0 general)