src/train_cmd.cpp
changeset 10287 e84ee4b8ba7b
parent 10282 ce00edcf1112
child 10307 86ce4ec269d4
--- a/src/train_cmd.cpp	Fri Oct 24 17:44:49 2008 +0000
+++ b/src/train_cmd.cpp	Fri Oct 24 20:53:57 2008 +0000
@@ -4104,7 +4104,7 @@
 	}
 
 	/* do not reverse when approaching red signal */
-	if (!signal && x + 4 >= TILE_SIZE) {
+	if (!signal && x + (v->u.rail.cached_veh_length + 1) / 2 >= TILE_SIZE) {
 		/* we are too near the tile end, reverse now */
 		v->cur_speed = 0;
 		ReverseTrainDirection(v);