Hopefully fix the last of the more obvious weapon bugs w/ infinite attack mode, add a depixeling sweep every 5s too.
authornemo
Sun, 10 Oct 2010 21:14:58 -0400
changeset 3954 ae3583ad6ea9
parent 3953 fd7ced2071a1
child 3955 d14ecff9502b
Hopefully fix the last of the more obvious weapon bugs w/ infinite attack mode, add a depixeling sweep every 5s too.
hedgewars/GSHandlers.inc
hedgewars/uGears.pas
--- a/hedgewars/GSHandlers.inc	Sun Oct 10 20:34:48 2010 -0400
+++ b/hedgewars/GSHandlers.inc	Sun Oct 10 21:14:58 2010 -0400
@@ -859,6 +859,7 @@
         StopSound(Gear^.SoundChannel);
         DeleteGear(Gear);
         AfterAttack;
+        doStepHedgehogMoving(HHGear);  // for gfInfAttack
         exit
     end;
 
@@ -2933,7 +2934,7 @@
 
         AfterAttack;
         CurAmmoGear := nil;
-        TurnTimeLeft := 14 * 125;
+        if (GameFlags and gfInfAttack) = 0 then TurnTimeLeft := 14 * 125;
 
         if (TrainingFlags and tfRCPlane) <> 0 then
             TurnTimeLeft := 0;
@@ -3695,7 +3696,8 @@
                 CurrentHedgehog^.Gear^.Active := true;
                 CurrentHedgehog^.Gear^.X := Gear^.X;
                 CurrentHedgehog^.Gear^.Y := int2hwFloat(cWaterLine+cVisibleWater)+_128;
-                CurrentHedgehog^.Unplaced := false
+                CurrentHedgehog^.Unplaced := false;
+                TurnTimeLeft:= 0
             end;
             ResumeMusic
         end;
@@ -3713,7 +3715,8 @@
             CurrentHedgehog^.Gear^.Active := true;
             CurrentHedgehog^.Gear^.X := Gear^.X;
             CurrentHedgehog^.Gear^.Y := int2hwFloat(cWaterLine+cVisibleWater)+_128;
-            CurrentHedgehog^.Unplaced := false
+            CurrentHedgehog^.Unplaced := false;
+            TurnTimeLeft:= 0
         end;
         ResumeMusic
     end
--- a/hedgewars/uGears.pas	Sun Oct 10 20:34:48 2010 -0400
+++ b/hedgewars/uGears.pas	Sun Oct 10 21:14:58 2010 -0400
@@ -854,6 +854,7 @@
         CurrentHedgehog^.Gear^.State:= CurrentHedgehog^.Gear^.State and not gstAttacked;
     if delay2 = 0 then
         begin
+        SweepDirty;
         CheckNoDamage;
         CheckForWin
         end