summaryrefslogtreecommitdiff
path: root/src/train_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-05-23 09:10:56 +0000
committerrubidium <rubidium@openttd.org>2009-05-23 09:10:56 +0000
commit6237fe146228e84761c6aba14bf7acf6c359f061 (patch)
tree0ff89de7f14a652d59d972e949761819642296a4 /src/train_cmd.cpp
parentda5661a0c8870c532c393ec3d330c3fbb44eb8ac (diff)
downloadopenttd-6237fe146228e84761c6aba14bf7acf6c359f061.tar.xz
(svn r16394) -Codechange: move (NewGRF) cache variables into a separate struct so (some vehicle related) NewGRF cache 'desyncs' can be tested easier.
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r--src/train_cmd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index e550c5dbd..d0bba76b6 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -241,13 +241,13 @@ void TrainConsistChanged(Train *v, bool same_length)
/* Set user defined data to its default value */
u->tcache.user_def_data = rvi_u->user_def_data;
- u->cache_valid = 0;
+ u->vcache.cache_valid = 0;
}
for (Train *u = v; u != NULL; u = u->Next()) {
/* Update user defined data (must be done before other properties) */
u->tcache.user_def_data = GetVehicleProperty(u, 0x25, u->tcache.user_def_data);
- u->cache_valid = 0;
+ u->vcache.cache_valid = 0;
}
for (Train *u = v; u != NULL; u = u->Next()) {
@@ -333,7 +333,7 @@ void TrainConsistChanged(Train *v, bool same_length)
if (!same_length) u->tcache.cached_veh_length = veh_len;
v->tcache.cached_total_length += u->tcache.cached_veh_length;
- u->cache_valid = 0;
+ u->vcache.cache_valid = 0;
}
/* store consist weight/max speed in cache */