summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-02-05 20:41:13 +0000
committerfrosch <frosch@openttd.org>2011-02-05 20:41:13 +0000
commitef3ec0f8c83567f0fce799270ea2e43ab7bb8cb0 (patch)
tree15ad2600b7a156154ccd87decd68b68315eb1836 /src/saveload
parentfaa2a26ae15d6a8cf986059ed504b3371e6c3e37 (diff)
downloadopenttd-ef3ec0f8c83567f0fce799270ea2e43ab7bb8cb0.tar.xz
(svn r21987) -Fix: Make news items, engine previews and AI preview events deal with no longer existing Engine items after resetting the pool.
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/afterload.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index 2d428d5ce..dc021af33 100644
--- 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 @@ 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 */