Fix bug when hedgehog moves not right after it is kicked
authorunc0rr
Sat, 14 Jul 2007 11:46:54 +0000
changeset 558 b2b840eeb10a
parent 557 a7d49d5e8257
child 559 6083fffc9e2f
Fix bug when hedgehog moves not right after it is kicked
hedgewars/HHHandlers.inc
--- a/hedgewars/HHHandlers.inc	Fri Jul 13 20:00:42 2007 +0000
+++ b/hedgewars/HHHandlers.inc	Sat Jul 14 11:46:54 2007 +0000
@@ -327,11 +327,10 @@
 procedure doStepHedgehogDriven(Gear: PGear);
 var t: PGear;
 begin
-if isInMultiShoot and (Gear^.Damage = 0) then
-   begin
-   exit
-   end;
-AllInactive:= false;
+if not isInMultiShoot then
+   AllInactive:= false
+else
+   Gear^.Message:= 0;
 
 if (TurnTimeLeft = 0) or (Gear^.Damage > 0) then
    begin
@@ -387,9 +386,12 @@
    exit
    end;
 
-   HedgehogChAngle(Gear);
-   if StepTicks > 0 then dec(StepTicks);
-   if (StepTicks = 0) then HedgehogStep(Gear)
+   if not isInMultiShoot then
+      begin
+      HedgehogChAngle(Gear);
+      if StepTicks > 0 then dec(StepTicks);
+      if (StepTicks = 0) then HedgehogStep(Gear)
+      end
 end;
 
 ////////////////////////////////////////////////////////////////////////////////