forgot to delete destination if assign and dest are equal

master
Steffen Pohle 2 years ago
parent f0bf67f740
commit 4990065ada

@ -1075,6 +1075,7 @@ int Locomotives::Loop() {
continue;
}
else {
debug (0, "%s:%d Locomotive [%s] is doing NOTHING", __FILE__, __LINE__, loco->name);
timer_start(&loco->auto_timenext);
loco->auto_onroute = LOCO_OR_SEARCH;
}
@ -1088,6 +1089,13 @@ int Locomotives::Loop() {
SetModeMan(loco->name);
continue;
}
if (strcmp(loco->blockassign, loco->blockdest) == 0) {
loco->blockdest[0] = 0;
debug (0, "* Locomotive '%s' DEST == ASSING", loco->name);
jp.Clear();
jp.AddObject("locomotive",_GetJSON(lnum));
if(network) network->ChangeListPushToAll(jp.ToString());
}
// try to find and lock a way
if (Loco_SearchAndLock(loco)) {

Loading…
Cancel
Save