bugfix
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>de.srsoftware</groupId>
|
<groupId>de.srsoftware</groupId>
|
||||||
<artifactId>web4rail</artifactId>
|
<artifactId>web4rail</artifactId>
|
||||||
<version>1.4.24</version>
|
<version>1.4.25</version>
|
||||||
<name>Web4Rail</name>
|
<name>Web4Rail</name>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<description>Java Model Railway Control</description>
|
<description>Java Model Railway Control</description>
|
||||||
|
|||||||
@@ -993,7 +993,11 @@ public class Train extends BaseClass implements Comparable<Train> {
|
|||||||
|
|
||||||
public String start(boolean auto) {
|
public String start(boolean auto) {
|
||||||
LOG.debug("{}.start({})",this,auto?"auto":"");
|
LOG.debug("{}.start({})",this,auto?"auto":"");
|
||||||
|
if (auto != autopilot) {
|
||||||
autopilot |= auto;
|
autopilot |= auto;
|
||||||
|
if (isSet(currentBlock)) plan.place(currentBlock);
|
||||||
|
}
|
||||||
|
|
||||||
if (isSet(nextPreparedRoute)) {
|
if (isSet(nextPreparedRoute)) {
|
||||||
LOG.debug("starting nextPreparedRoute: {}",nextPreparedRoute);
|
LOG.debug("starting nextPreparedRoute: {}",nextPreparedRoute);
|
||||||
if (nextPreparedRoute.startNow()) {
|
if (nextPreparedRoute.startNow()) {
|
||||||
@@ -1049,11 +1053,13 @@ public class Train extends BaseClass implements Comparable<Train> {
|
|||||||
endBrake();
|
endBrake();
|
||||||
setSpeed(0);
|
setSpeed(0);
|
||||||
quitAutopilot();
|
quitAutopilot();
|
||||||
if (isSet(route) && route.hasTriggeredContacts()) {
|
if (isSet(route)) {
|
||||||
|
if (route.hasTriggeredContacts()) {
|
||||||
stuckTrace = new HashSet<Tile>();
|
stuckTrace = new HashSet<Tile>();
|
||||||
for (Tile tile : route.path()) { // collect occupied tiles of route. stuckTrace is considered during next route search
|
for (Tile tile : route.path()) { // collect occupied tiles of route. stuckTrace is considered during next route search
|
||||||
if (trace.contains(tile)) stuckTrace.add(tile);
|
if (trace.contains(tile)) stuckTrace.add(tile);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
route.reset();
|
route.reset();
|
||||||
route = null;
|
route = null;
|
||||||
}
|
}
|
||||||
@@ -1169,7 +1175,7 @@ public class Train extends BaseClass implements Comparable<Train> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (Tile tile : trace) tile.free(this);
|
dropTrace(false);
|
||||||
trace = newTrace;
|
trace = newTrace;
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user