100.0&r2056 - AI try to connect an unable route many times
simutrans 100.0&r2056
AI try to connect an unable route many times, and never try another route.
This problem happens in this case:
- There is "missing" route in the root.
- There isn't any suitable place to make stop.
I made a patch to solve this problem. But I don't know this code is safety or not.
Index: simplay.cc
===================================================================
--- simplay.cc (r2056)
+++ simplay.cc (copy)
@@ -2398,6 +2398,10 @@
}
// no success at all?
if(state==NR_BAUE_ROUTE1) {
+ // add to impossible connections
+ forbidden_conections.append( fabconnection_t( start->gib_pos().gib_2d(), ziel->gib_pos().gib_2d(), freight ) );
+ // otherwise it may always try to built the same route!
+ ziel = NULL;
state = CHECK_CONVOI;
}
}