Move health:= 6 to gear addition so lua can more easily override it.
authornemo
Sun, 13 Sep 2015 15:36:06 -0400
changeset 11169 1b386b9e1be0
parent 11168 c75f87d4bb64
child 11170 22d8835beb4d
Move health:= 6 to gear addition so lua can more easily override it.
hedgewars/uGearsHandlersMess.pas
hedgewars/uGearsList.pas
--- a/hedgewars/uGearsHandlersMess.pas	Sat Sep 12 21:13:35 2015 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Sun Sep 13 15:36:06 2015 -0400
@@ -2718,7 +2718,6 @@
             Gear^.dX := Gear^.dX - cBombsSpeed * hwSqrt((int2hwFloat(Gear^.Target.Y) - Gear^.Y) * 2 /
                 cGravity) * Gear^.Tag;
 
-    Gear^.Health := 6;
     Gear^.doStep := @doStepAirAttackWork;
     Gear^.SoundChannel := LoopSound(sndPlane, 4000);
 
--- a/hedgewars/uGearsList.pas	Sat Sep 12 21:13:35 2015 +0200
+++ b/hedgewars/uGearsList.pas	Sun Sep 13 15:36:06 2015 -0400
@@ -466,6 +466,7 @@
                 gear^.Tag:= Y
                 end;
    gtAirAttack: begin
+                gear^.Health:= 6;
                 gear^.Z:= cHHZ+2;
                 gear^.Tint:= gear^.Hedgehog^.Team^.Clan^.Color shl 8 or $FF
                 end;