anchor.diff:  var
     DX,DY:shortint;
     WalkX,WalkY,Distance:single;
  +  FoundEnemy: TKMUnit;
   begin
     if KMSamePoint(fNextPos,KMPoint(0,0)) then
       fNextPos := KMUnit.GetPosition; //Set fNextPos to current pos so it initializes on the first run
  
positive.code:     if KMStepIsDiag(KMUnit.PrevPosition,KMUnit.NextPosition) and (fTileSteps > 0) then
        DecVertex;
  
      if fTileSteps >= fStamina then
      begin
        Result := ActDone; //Finished run
        //Make it so that when we halt we stay at this new location if we have not been given different order
        if TKMUnitWarrior(KMUnit).GetOrder = wo_None then
          TKMUnitWarrior(KMUnit).OrderLocDir := KMPointDir(KMUnit.GetPosition,TKMUnitWarrior(KMUnit).OrderLocDir.Dir);
        exit;
      end;
  
      //Begin the next step
      fNextPos := KMGetPointInDir(KMUnit.GetPosition, KMUnit.Direction).Loc;
      if CheckForObstacle(KMUnit, fNextPos) then
      begin
        Result := ActDone; //Hit an obstacle
        //Make it so that when we halt we stay at this new location if we have not been given different order
        if TKMUnitWarrior(KMUnit).GetOrder = wo_None then
          TKMUnitWarrior(KMUnit).OrderLocDir := KMPointDir(KMUnit.GetPosition,TKMUnitWarrior(KMUnit).OrderLocDir.Dir);
        exit;
      end;
      //Do some house keeping because we have stepped on a new tile
      KMUnit.UpdateNextPosition(fNextPos);
      fTerrain.UnitWalk(KMUnit.PrevPosition,KMUnit.NextPosition,KMUnit); //Pre-occupy next tile
      if KMStepIsDiag(KMUnit.PrevPosition,KMUnit.NextPosition) then
  
negative.code: 
    inc(KMUnit.AnimStep);
    StepDone := false; //We are not actually done because now we have just taken another step
    Result := ActContinues;
  end;
  
  
  