chiark / gitweb /
really prefer existing point position
authorian <ian>
Sun, 4 May 2008 19:48:48 +0000 (19:48 +0000)
committerian <ian>
Sun, 4 May 2008 19:48:48 +0000 (19:48 +0000)
hostside/movpos.c
hostside/xs.gdb

index 94f4eeea0852f33b4a6180397cde9c0b1e5f8c2b..35196c0dcb522eeee5f3ee494a45c019d08336ba 100644 (file)
@@ -611,18 +611,16 @@ ErrorCode movpos_findcomb_bysegs(Segment *back, Segment *move, Segment *fwd,
     if (back && !(back==tback || back==tfwd)) continue;
     if (fwd  && !(fwd ==tback || fwd ==tfwd)) continue;
 
-    if (movei->n_movfeats>1) {
-      /* we have to search for the one which is least effort, then */
-      tchanges= evaluate_target(move,tcomb,startpoint,0);
-      if (tchanges >= bestchanges) /* prefer low-numbered movposcombs */
-       continue;
-      if (tchanges==-1) {
-       tchanges= INT_MAX-1;
-       /* fall through and update */
-      }
-    } else {
-      tchanges= 1;
-    }
+    /* we have to search for the one which is least effort */
+    tchanges= evaluate_target(move,tcomb,startpoint,0);
+
+    if (tchanges==-1)
+      /* mixed kinds */
+      tchanges= INT_MAX-1;
+
+    if (tchanges >= bestchanges) /* prefer low-numbered movposcombs */
+      continue;
+
     bestcomb= tcomb;
     bestchanges= tchanges;
   }
index 76f606ee7744d6dbefea39263e6fa72124a201af..44c385f617cb3d9e87a7fe474be5af6fbbeea2a2 100644 (file)
@@ -3,6 +3,6 @@ break vdie
 break nmra_errchk_fail
 break predict_problem
 break safety_panic
-break findhead_nextseg
+#break findhead_nextseg
 set args -S+realtime.log shinkansen.speeds.record homes.record 
 run