anchor.diff:      //We should try to make a new route if we're blocked by a locked opponent, or if we were blocked in the past (to clear fDestBlocked)
       if fDestBlocked or fOpponent.Action.Locked then
       begin
  -      NewNodeList := TKMPointList.Create;
  +      newNodeList := TKMPointList.Create;
         //Make a new route avoiding tiles with busy units
  -      if gGame.Pathfinding.Route_MakeAvoid(fUnit.Position, fWalkTo, [GetEffectivePassability], fDistance, fTargetHouse, NewNodeList) then
  +      if gGame.Pathfinding.Route_MakeAvoid(fUnit.Position, fWalkTo, [GetEffectivePassability], fDistance, fTargetHouse, newNodeList) then
           //Check if the new route still goes through busy units (no other route exists)
  -        if (NewNodeList.Count > 1) and gTerrain.TileIsLocked(NewNodeList[1]) then
  +        if (newNodeList.Count > 1) and gTerrain.TileIsLocked(newNodeList[1]) then
           begin
             fDestBlocked := True; //When in this mode we are zero priority as we cannot reach our destination. This allows serfs with stone to get through and clear our path.
             fInteractionStatus := kisWaiting; //If route cannot be made it means our destination is currently not available (workers in the way) So allow us to be pushed.
  
positive.code:         begin
            //NodeList has now been re-routed, so we need to re-init everything else and start walk again
            NodeList.Free; //Free our current node list and swap in this new one
            NodeList := NewNodeList;
            NewNodeList := nil; //So we don't FreeAndNil it at the end (it's now our main node list)
            SetInitValues;
            Explanation := 'Unit in the way is working so we will re-route around it';
            ExplanationLogAdd;
  
negative.code:     //Tiles to the left (-1) and right (+1) (relative to unit) of the one we are walking to
      for I := 0 to 1 do
      begin
        if I = 0 then tempPos := KMGetPointInDir(fUnit.Position, KMPrevDirection((KMGetDirection(fUnit.Position,NodeList[NodePos+1]))));
        if I = 1 then tempPos := KMGetPointInDir(fUnit.Position, KMNextDirection((KMGetDirection(fUnit.Position,NodeList[NodePos+1]))));
  
        //First make sure tile is on map and walkable!
        if gTerrain.TileInMapCoords(tempPos.X, tempPos.Y)
        and gTerrain.CanWalkDiagonaly(fUnit.Position, tempPos.X, tempPos.Y)
        and (GetEffectivePassability in gTerrain.Land[tempPos.Y, tempPos.X].Passability) then
  
          if gTerrain.HasUnit(tempPos) then //Now see if it has a unit
          begin
            //There is a unit here, first find our alternate opponent
            altOpponent := gTerrain.UnitsHitTest(tempPos.X, tempPos.Y);
  
            //Make sure unit really exists, is walking and has arrived on tile
            if (altOpponent <> nil) and (altOpponent.Action is TKMUnitActionWalkTo) and
              (not TKMUnitActionWalkTo(altOpponent.Action).fDoExchange)
              and (not TKMUnitActionWalkTo(altOpponent.Action).fDoesWalking)
              and ((not KMStepIsDiag(fUnit.NextPosition,NodeList[NodePos+1])) //Isn't diagonal
              or ((KMStepIsDiag(fUnit.NextPosition,NodeList[NodePos+1])       //...or is diagonal and...
              and not gTerrain.HasVertexUnit(KMGetDiagVertex(fUnit.Position, tempPos))))) then //...vertex is free
              if TKMUnitActionWalkTo(altOpponent.Action).GetNextNextPosition(opponentNextNextPos) then
                if KMSamePoint(opponentNextNextPos, fUnit.Position) //Now see if they want to exchange with us
                //Check that our tile is walkable for the opponent! (we could be a worker on a building site)
                and (TKMUnitActionWalkTo(altOpponent.Action).GetEffectivePassability in gTerrain.Land[fUnit.Position.Y,fUnit.Position.X].Passability) then
                begin
                  //Perform exchange from our position to tempPos
                  TKMUnitActionWalkTo(altOpponent.Action).PerformExchange(KMPOINT_ZERO); //Request unforced exchange
  
                  Explanation:='Unit on tile next to target tile wants to swap. Performing an exchange';
                  ExplanationLogAdd;
                  fDoExchange := true;
                  ChangeStepTo(tempPos);
                  //They both will exchange next tick
                  Result := true; //Means exit DoUnitInteraction
                  exit; //Once we've found a solution, do NOT check the other alternative dodge position (when for loop i=1)
  