summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-04-08 17:27:45 +0000
committerrubidium <rubidium@openttd.org>2010-04-08 17:27:45 +0000
commita6172370212ce5fa5a3a95cab179cde76e88d21a (patch)
treee543d0248963aca24566612c405c653e9052002c
parent54067acb0fad35c52ea0b5a750168a62b236f8d3 (diff)
downloadopenttd-a6172370212ce5fa5a3a95cab179cde76e88d21a.tar.xz
(svn r19587) -Fix: false positive in cache validity checking when a train crashes; the max curve speed depends on the 'angle' between wagons and with wagons spinning around randomly without updating the max curve speed cache that leads to "seeing" a difference. As the caches aren't useful for crashed vehicles anymore, just ignore those vehicles
-rw-r--r--src/openttd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 8f6edee8b..e5e05a048 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -1106,7 +1106,7 @@ static void CheckCaches()
Vehicle *v;
FOR_ALL_VEHICLES(v) {
- if (v != v->First()) continue;
+ if (v != v->First() || v->vehstatus & VS_CRASHED) continue;
switch (v->type) {
case VEH_ROAD: {