diff src/saveload/afterload.cpp @ 17247:5221777879f1 draft

(svn r21987) -Fix: Make news items, engine previews and AI preview events deal with no longer existing Engine items after resetting the pool.
author frosch <frosch@openttd.org>
date Sat, 05 Feb 2011 20:41:13 +0000 (2011-02-05)
parents 7b48e75bd53c
children 2d2cbb8602d2
line wrap: on
line diff
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -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 @@
 	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 */