diff --git a/server/locomotive.cc b/server/locomotive.cc index 176392a..078f6af 100644 --- a/server/locomotive.cc +++ b/server/locomotive.cc @@ -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)) {