diff options
author | rubidium <rubidium@openttd.org> | 2010-11-27 21:09:41 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-11-27 21:09:41 +0000 |
commit | b46e57d3640ea6b2b6f301ebaa454084565da301 (patch) | |
tree | f0bd2350642651ff6cba192c5ed3064f204b23e1 /src/openttd.cpp | |
parent | def0d7176773c2ff649c6a2ac0d5c686d2233e0c (diff) | |
download | openttd-b46e57d3640ea6b2b6f301ebaa454084565da301.tar.xz |
(svn r21338) -Fix [FS#4272]: bogus cache mismatch warnings with desync debugging because some cache was invalidated but never reset
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r-- | src/openttd.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp index ef7e356ea..c74709b43 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -1132,6 +1132,7 @@ static void CheckCaches() Vehicle *v; FOR_ALL_VEHICLES(v) { + extern void FillNewGRFVehicleCache(const Vehicle *v); if (v != v->First() || v->vehstatus & VS_CRASHED || !v->IsPrimaryVehicle()) continue; uint length = 0; @@ -1145,6 +1146,7 @@ static void CheckCaches() length = 0; for (const Vehicle *u = v; u != NULL; u = u->Next()) { + FillNewGRFVehicleCache(u); grf_cache[length] = u->grf_cache; veh_cache[length] = u->vcache; switch (u->type) { @@ -1171,6 +1173,7 @@ static void CheckCaches() length = 0; for (const Vehicle *u = v; u != NULL; u = u->Next()) { + FillNewGRFVehicleCache(u); if (memcmp(&grf_cache[length], &u->grf_cache, sizeof(NewGRFCache)) != 0) { DEBUG(desync, 2, "newgrf cache mismatch: type %i, vehicle %i, company %i, unit number %i, wagon %i", (int)v->type, v->index, (int)v->owner, v->unitnumber, length); } |