more button updates, wait for hogs in infinite attack mode stop moving before clearing their damage (just used an arbitrary small interval)
authornemo
Fri, 05 Nov 2010 11:51:34 -0400
changeset 4120 0aba28eb8e34
parent 4119 0d3e701491fb
child 4122 c80434d6f314
more button updates, wait for hogs in infinite attack mode stop moving before clearing their damage (just used an arbitrary small interval)
QTfrontend/res/btnAISurvival.png
QTfrontend/res/btnInfAttack.png
QTfrontend/res/btnResetHealth.png
hedgewars/uGears.pas
Binary file QTfrontend/res/btnAISurvival.png has changed
Binary file QTfrontend/res/btnInfAttack.png has changed
Binary file QTfrontend/res/btnResetHealth.png has changed
--- a/hedgewars/uGears.pas	Fri Nov 05 11:06:22 2010 -0400
+++ b/hedgewars/uGears.pas	Fri Nov 05 11:51:34 2010 -0400
@@ -627,7 +627,7 @@
 Gear:= GearsList;
 while Gear <> nil do
     begin
-    if Gear^.Kind = gtHedgehog then
+    if (Gear^.Kind = gtHedgehog) and (((GameFlags and gfInfAttack) = 0) or ((Gear^.dX.QWordValue < _0_000004.QWordValue) and (Gear^.dY.QWordValue < _0_000004.QWordValue))) then
         begin
         if (not isInMultiShoot) then inc(Gear^.Damage, Gear^.Karma);
         if (Gear^.Damage <> 0) and