(svn r21987) -Fix: Make news items, engine previews and AI preview events deal with no longer existing Engine items after resetting the pool.

This commit is contained in:
frosch
2011-02-05 20:41:13 +00:00
parent dd1c718ac7
commit c003e1a358
6 changed files with 41 additions and 0 deletions

View File

@@ -51,6 +51,7 @@
#include "../rail_gui.h"
#include "../core/backup_type.hpp"
#include "../smallmap_gui.h"
#include "../news_func.h"
#include "table/strings.h"
@@ -2604,6 +2605,8 @@ void ReloadNewGRFData()
AfterLoadStations();
/* 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);
/* redraw the whole screen */