anchor.diff:  
   function TKMUnitVisual.GetLerp(aLag: Single): TKMUnitVisualState;
   begin
  -  Result := TKMUnitVisualState.Lerp(fCurr, fPrev, aLag);
  +  Result.PosF := KMLerp(fCurr.PosF, fPrev.PosF, aLag);
  +  Result.SlideX := KromUtils.Lerp(fCurr.SlideX, fPrev.SlideX, aLag);
  +  Result.SlideY := KromUtils.Lerp(fCurr.SlideY, fPrev.SlideY, aLag);
  +  //If there's no lag, use the current state
  +  if aLag = 0.0 then
  +  begin
  +    Result.Dir := fCurr.Dir;
  +    Result.Action := fCurr.Action;
  +    Result.AnimStep := fCurr.AnimStep;
  +    Result.AnimFraction := 0.0;
  +  end
  +  else
  +  begin
  +    //Don't start a new action or change direction until the last one is 100% finished
  +    Result.Dir := fPrev.Dir;
  +    Result.Action := fPrev.Action;
  +    Result.AnimStep := fPrev.AnimStep;
  +    Result.AnimFraction := 0.0;
  +    //If action/dir/step is consistent we can interpolate the animation
  +    if (fCurr.Action = fPrev.Action) and (fCurr.Dir = fPrev.Dir) and (fCurr.AnimStep - fPrev.AnimStep = 1) then
  +      Result.AnimFraction := 1.0 - aLag;
  +  end;
   end;
   
   
  
positive.code:   SlideX := U.GetSlide(axX);
    SlideY := U.GetSlide(axY);
    AnimStep := U.AnimStep;
  
    if U.Action <> nil then
      Action := U.Action.ActionType
    else
      Action := uaUnknown;
  end;
  
  
  class function TKMUnitVisualState.Lerp(const A, B: TKMUnitVisualState; Mix: Single): TKMUnitVisualState;
  begin
    Result.PosF := KMLerp(A.PosF, B.PosF, Mix);
    Result.SlideX := KromUtils.Lerp(A.SlideX, B.SlideX, Mix);
    Result.SlideY := KromUtils.Lerp(A.SlideY, B.SlideY, Mix);
    if Mix < 0.5 then
    begin
      Result.Dir := A.Dir;
      Result.AnimStep := A.AnimStep;
      Result.Action := A.Action;
    end
    else
    begin
      Result.Dir := B.Dir;
      Result.AnimStep := B.AnimStep;
      Result.Action := B.Action;
    end;
  end;
  
  
  
negative.code:     SlideX, SlideY: Single;
      Action: TKMUnitActionType;
      AnimStep: Integer;
      AnimFraction: Single;
  
      procedure SetFromUnit(aUnit: TObject);
    end;
  
    // Purely visual thing. Split from TKMUnit to aviod mixup of game-logic and render Positions
  