anchor.diff:        if (Self.fstaveni.from_stack <> nil) then
           (Self.fstaveni.from_stack as TORStack).firstEnabled := true;
   
  -      // jeste jednou zkontrolujeme, jeslti jsou vyybky ve spravnych polohach,
  -      // protoze se teoreticky behem staveni mohly nejak podhodit...
  -
  -      for i := 0 to Self.fproperties.Vyhybky.Count-1 do
  -       begin
  -        Blky.GetBlkByID(Self.fproperties.Vyhybky[i].Blok, Blk);
  -        if ((Blk as TBlkVyhybka).Poloha <> Self.fproperties.Vyhybky[i].Poloha) then
  +      // Kontrola kritickych podminek.
  +      // (behem staveni mohla nastat zmena)
  +
  +      bariery := TList<TJCBariera>.Create();
  +      try
  +        Self.KontrolaPodminekVCPC(bariery);
  +        for bariera in bariery do
            begin
  -          if (Self.fstaveni.SenderPnl <> nil) and (Self.fstaveni.SenderOR <> nil) then
  -            ORTCPServer.BottomError(Self.fstaveni.SenderPnl, 'Nepoloha '+Blk.name,
  -              (Self.fstaveni.SenderOR as TOR).ShortName, 'TECHNOLOGIE');
  -          writelog('Krok 14 : Vyhybka '+Blk.name+' nema spravnou polohu !', WR_VC);
  -          Exit;
  +          case (bariera.typ) of
  +            _JCB_BLOK_DISABLED, _JCB_BLOK_NOT_EXIST, _JCB_BLOK_NOT_TYP,
  +            _JCB_SCOM_NOT_USEK, _JCB_USEK_OBSAZENO, _JCB_USEK_SOUPRAVA, _JCB_USEK_AB,
  +            _JCB_VYHYBKA_KONC_POLOHA, _JCB_VYHYBKA_NESPAVNA_POLOHA, _JCB_PREJEZD_NOUZOVE_OTEVREN,
  +            _JCB_PREJEZD_PORUCHA, _JCB_ODVRAT_KONC_POLOHA, _JCB_TRAT_ZAK, _JCB_TRAT_OBSAZENO,
  +            _JCB_TRAT_ZADOST, _JCB_TRAT_NESOUHLAS, _JCB_TRAT_NO_BP, _JCB_ZAMEK_NEUZAMCEN: begin
  +              if (Self.fstaveni.SenderPnl <> nil) and (Self.fstaveni.SenderOR <> nil) then
  +                ORTCPServer.BottomError(Self.fstaveni.SenderPnl, 'Podmnky pro JC nesplnny!',
  +                  (Self.fstaveni.SenderOR as TOR).ShortName, 'TECHNOLOGIE');
  +              writelog('Krok 14 : Podmnky pro JC nesplnny!', WR_VC);
  +              Exit();
  +            end;
  +          end;
            end;
  -       end;//for cyklus
  -
  -      for i := 0 to Self.fproperties.Odvraty.Count-1 do
  -       begin
  -        Blky.GetBlkByID(Self.fproperties.Odvraty[i].Blok, Blk);
  -        if ((Blk as TBlkVyhybka).Poloha <> Self.fproperties.Odvraty[i].Poloha) then
  -         begin
  -          if (Self.fstaveni.SenderPnl <> nil) and (Self.fstaveni.SenderOR <> nil) then
  -            ORTCPServer.BottomError(Self.fstaveni.SenderPnl, 'Nepoloha '+Blk.name,
  -              (Self.fstaveni.SenderOR as TOR).ShortName, 'TECHNOLOGIE');
  -          writelog('Krok 14 : Vyhybka '+Blk.name+' nema spravnou polohu !', WR_VC);
  -          Exit;
  -         end;
  -       end;//for cyklus
  +      finally
  +        bariery.Free();
  +      end;
   
         // trat
         // zruseni redukce posledniho bloku jizdni cesty je navazano na zruseni zaveru trati
  
positive.code:       bariery.Add(Self.JCBariera(_JCB_TRAT_ZAVER, blk, Self.fproperties.Trat));
      if ((blk as TBlkTrat).Zadost) then
        bariery.Add(Self.JCBariera(_JCB_TRAT_ZADOST, blk, Self.fproperties.Trat));
  
      if ((not TBlkTrat(blk).SameUserControlsBothUvazka()) or ((blk as TBlkTrat).nouzZaver)) then
        if ((((blk as TBlkTrat).GetSettings().zabzar = TTratZZ.souhlas) or ((blk as TBlkTrat).GetSettings().zabzar = TTratZZ.nabidka) or
  
negative.code:        begin
          Blky.GetBlkByID(Self.fproperties.Trat, Blk);
          Blky.GetBlkByID(Self.fproperties.Useky[Self.fproperties.Useky.Count-1], Blk2);
  
          if (Self.fproperties.TypCesty = TJCType.vlak) then (Blk as TBlkTrat).Zaver := true;
  
  