File diff r18852:267bfa8199f1 → r18853:205086193fac
src/saveload/afterload.cpp
Show inline comments
 
@@ -2732,44 +2732,44 @@ bool AfterLoadGame()
 

	
 
	GamelogPrintDebug(1);
 

	
 
	InitializeWindowsAndCaches();
 
	/* Restore the signals */
 
	ResetSignalHandlers();
 
	return true;
 
}
 

	
 
/**
 
 * Reload all NewGRF files during a running game. This is a cut-down
 
 * version of AfterLoadGame().
 
 * XXX - We need to reset the vehicle position hash because with a non-empty
 
 * hash AfterLoadVehicles() will loop infinitely. We need AfterLoadVehicles()
 
 * to recalculate vehicle data as some NewGRF vehicle sets could have been
 
 * removed or added and changed statistics
 
 */
 
void ReloadNewGRFData()
 
{
 
	/* reload grf data */
 
	GfxLoadSprites();
 
	LoadStringWidthTable();
 
	RecomputePrices();
 
	/* reload vehicles */
 
	ResetVehiclePosHash();
 
	ResetVehicleHash();
 
	AfterLoadVehicles(false);
 
	StartupEngines();
 
	GroupStatistics::UpdateAfterLoad();
 
	/* update station graphics */
 
	AfterLoadStations();
 
	/* Update company statistics. */
 
	AfterLoadCompanyStats();
 
	/* Check and update house and town values */
 
	UpdateHousesAndTowns();
 
	/* Delete news referring to no longer existing entities */
 
	DeleteInvalidEngineNews();
 
	/* Update livery selection windows */
 
	for (CompanyID i = COMPANY_FIRST; i < MAX_COMPANIES; i++) InvalidateWindowData(WC_COMPANY_COLOUR, i);
 
	/* Update company infrastructure counts. */
 
	InvalidateWindowClassesData(WC_COMPANY_INFRASTRUCTURE);
 
	/* redraw the whole screen */
 
	MarkWholeScreenDirty();
 
	CheckTrainsLengths();
 
}