anchor.diff:  implementation
   uses
     KromUtils, Math, SysUtils,
  -  KM_Units;
  +  KM_Units, KM_Resource;
   
   
   { TKMUnitVisualState }
  
positive.code:   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;
  
  
  procedure TKMUnitVisual.UpdateState;
  begin
    fPrev := fCurr;
    fCurr.SetFromUnit(fUnit);
  end;
  
negative.code:     fUnit: TObject;
      fCurr: TKMUnitVisualState;
      fPrev: TKMUnitVisualState;
      fPrevPrev: TKMUnitVisualState;
    public
      constructor Create(aUnit: TObject);
  
  