anchor.diff:      //Completely re-route if no simple side step solution is available
       if CanWalkToTarget(fUnit.CurrPosition, GetEffectivePassability) then
       begin
  +      U := fUnit; //Local copy since Self will get freed if TrySetActionWalk succeeds
  +      animStep := fUnit.AnimStep; //Save anim step locally
         fUnit.SetActionWalk(fWalkTo, fType, fDistance, fTargetUnit, fTargetHouse);
  +      //Now Self = nil since the walk action was replaced! Don't access members and exit ASAP
  +      //Restore direction, cause it usually looks unpleasant,
  +      //when warrior turns to locked Loc and then immidiately (in 1 tick) turns away when on new route
  +      U.Direction := aDir;
  +      U.AnimStep := animStep; //Restore anim step as well, it looks smoother (otherwise unit will stay still for a 1 tick)
         //Now Self = nil since the walk action was replaced! Don't access members and exit ASAP
         Exit(ocReRouteMade);
       end else
  
positive.code:   DistNext: Single;
    AllTilesAroundLocked: Boolean;
    U: TKMUnit;
  begin
    Result := ocNoObstacle;
  
  
negative.code:       else
        begin
          U := fUnit; //Local copy since Self will get freed if TrySetActionWalk succeeds
          animStep := fUnit.AnimStep; //Save anim step locally
          if fUnit.TrySetActionWalk(fWalkTo, fType, fDistance, fTargetUnit, fTargetHouse, False) then
          begin
            //Now Self = nil since the walk action was replaced! Don't access members and exit ASAP
            //Restore direction, cause it usually looks unpleasant,
            //when warrior turns to locked Loc and then immidiately (in 1 tick) turns away when on new route
            U.Direction := aDir;
            U.AnimStep := animStep; //Restore anim step as well, it looks smoother (otherwise unit will stay still for a 1 tick)
            Exit(ocReRouteMade);
          end else
            Exit(ocNoObstacle); //Same as when AllTilesAroundLocked
  