changeset 17519:e95c74f7f925 draft

(svn r22280) -Fix: update the 40+x station vars caches when displaying them in the NewGRF debug gui
author yexo <yexo@openttd.org>
date Wed, 30 Mar 2011 21:39:44 +0000
parents a75433965b0c
children bf14404ac816
files src/newgrf_station.cpp
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/newgrf_station.cpp
+++ b/src/newgrf_station.cpp
@@ -539,6 +539,9 @@
 	res->reseed          = 0;
 	res->count           = 0;
 	res->grffile         = (statspec != NULL ? statspec->grf_prop.grffile : NULL);
+
+	/* Invalidate all cached vars */
+	_svc.valid = 0;
 }
 
 static const SpriteGroup *ResolveStation(ResolverObject *object)
@@ -573,9 +576,6 @@
 	/* Remember the cargo type we've picked */
 	object->u.station.cargo_type = ctype;
 
-	/* Invalidate all cached vars */
-	_svc.valid = 0;
-
 	return SpriteGroup::Resolve(group, object);
 }