changeset 14976:8b5d0410a028 draft

(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
author rubidium <rubidium@openttd.org>
date Thu, 08 Apr 2010 17:27:45 +0000
parents 30a0abfe85ca
children 31f99d3d2d39
files src/openttd.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -1106,7 +1106,7 @@
 
 	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: {