Allow aiming while moving
authorunc0rr
Mon, 26 May 2008 18:10:51 +0000
changeset 952 9dd48265e0b9
parent 951 c021955435b2
child 953 237fc147950c
Allow aiming while moving
hedgewars/HHHandlers.inc
--- a/hedgewars/HHHandlers.inc	Sun May 25 20:33:31 2008 +0000
+++ b/hedgewars/HHHandlers.inc	Mon May 26 18:10:51 2008 +0000
@@ -374,10 +374,9 @@
 
 procedure HedgehogChAngle(Gear: PGear);
 begin
-if ((Gear^.State and gstMoving) = 0) then
-   if (Gear^.Message and gm_Up    )<>0 then if Gear^.Angle > CurMinAngle then dec(Gear^.Angle)
-   else else
-   if (Gear^.Message and gm_Down  )<>0 then if Gear^.Angle < CurMaxAngle then inc(Gear^.Angle);
+if ((Gear^.Message and gm_Up) <> 0) and (Gear^.Angle > CurMinAngle) then dec(Gear^.Angle)
+else
+if ((Gear^.Message and gm_Down) <> 0) and (Gear^.Angle < CurMaxAngle) then inc(Gear^.Angle);
 end;
 
 procedure doStepHedgehog(Gear: PGear); forward;
@@ -519,6 +518,8 @@
    exit
    end;
 
+if not isInMultiShoot then
+   HedgehogChAngle(Gear);
 
 if (Gear^.State and gstMoving) <> 0 then
    begin
@@ -549,7 +550,6 @@
 
    if not isInMultiShoot then
       begin
-      HedgehogChAngle(Gear);
       if StepTicks > 0 then dec(StepTicks);
       if (StepTicks = 0) then HedgehogStep(Gear)
       end