anchor.diff:  procedure TUnitActionStay.Execute(KMUnit: TKMUnit; TimeDelta: single; out DoEnd: Boolean);
   var Cycle,Step:byte;
   begin
  -  if not StayStill then begin 
  +  if not StayStill then
  +  begin
  +    Cycle := max(UnitSprite[byte(KMUnit.GetUnitType)].Act[byte(ActionType)].Dir[byte(KMUnit.Direction)].Count,1);
  +    Step  := KMUnit.AnimStep mod Cycle;
   
  -    Cycle:=max(UnitSprite[byte(KMUnit.GetUnitType)].Act[byte(ActionType)].Dir[byte(KMUnit.Direction)].Count,1);
  -    Step:=KMUnit.AnimStep mod Cycle;
  -
  -    IsStepDone:=KMUnit.AnimStep mod Cycle = 0;
  +    IsStepDone := KMUnit.AnimStep mod Cycle = 0;
   
       if TimeToStay >= 1 then MakeSound(KMUnit, Cycle, Step);
   
  
positive.code: unit KM_UnitActionStay;
  interface
  uses Classes, KM_Defaults, KromUtils, KM_Utils, KM_CommonTypes, KM_Player, KM_Units, SysUtils, Math;
  
  
  {Stay in place for set time}
  type
    TUnitActionStay = class(TUnitAction)
    private
      StayStill:boolean;
      TimeToStay:integer;
  
negative.code: end;
  
  
  
  
  end.
  