Remove animation on jumping/resuming walk, only leave it in on weapon switch
authornemo
Sun, 14 Mar 2010 20:32:56 +0000
changeset 2993 d83edb74e92d
parent 2992 5ef18e26f183
child 2994 7ae3067546f2
Remove animation on jumping/resuming walk, only leave it in on weapon switch
hedgewars/HHHandlers.inc
hedgewars/uGears.pas
--- a/hedgewars/HHHandlers.inc	Sun Mar 14 20:31:28 2010 +0000
+++ b/hedgewars/HHHandlers.inc	Sun Mar 14 20:32:56 2010 +0000
@@ -395,7 +395,6 @@
          if not cArtillery then Gear^.dX:= SignAs(_0_15, Gear^.dX);
          Gear^.State:= Gear^.State or gstMoving or gstHHJumping;
          PlaySound(sndJump1, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack);
-         Gear^.Timer:= 10;
          exit
          end;
       end;
@@ -409,7 +408,6 @@
       SetLittle(Gear^.dX);
       Gear^.State:= Gear^.State or gstMoving or gstHHJumping;
       PlaySound(sndJump3, PHedgehog(Gear^.Hedgehog)^.Team^.voicepack);
-      Gear^.Timer:= 10;
       exit
       end;
 
--- a/hedgewars/uGears.pas	Sun Mar 14 20:31:28 2010 +0000
+++ b/hedgewars/uGears.pas	Sun Mar 14 20:32:56 2010 +0000
@@ -589,20 +589,17 @@
     step: (stDelay, stChDmg, stSweep, stTurnReact,
             stAfterDelay, stChWin, stWater, stChWin2, stHealth,
             stSpawn, stNTurn) = stDelay;
-var StoppedSteps: boolean;
 var Gear, t: PGear;
 begin
 PrvInactive:= AllInactive;
 AllInactive:= true;
-StoppedSteps:= false;
 
 if (StepSoundTimer > 0) and (StepSoundChannel < 0) then
     StepSoundChannel:= LoopSound(sndSteps)
 else if (StepSoundTimer = 0) and (StepSoundChannel > -1) then
     begin
     StopSound(StepSoundChannel);
-    StepSoundChannel:= -1;
-    StoppedSteps:= true
+    StepSoundChannel:= -1
     end;
 
 if StepSoundTimer > 0 then
@@ -613,7 +610,6 @@
     begin
     Gear:= t;
     t:= Gear^.NextGear;
-    if (Gear = CurrentHedgehog^.Gear) and (StoppedSteps) then Gear^.Timer:= 10;
     if Gear^.Active then
         begin
         if Gear^.RenderTimer and (Gear^.Timer > 500) and ((Gear^.Timer mod 1000) = 0) then