No point in leaving hogs at 0, since shotgun triggers death anyway. Also, add some audio cues to extra damage / time
authornemo
Mon, 08 Nov 2010 22:11:46 -0500
changeset 4224 99c6d87df131
parent 4223 c802849e94aa
child 4225 ce9e2b05e9c1
No point in leaving hogs at 0, since shotgun triggers death anyway. Also, add some audio cues to extra damage / time
hedgewars/GSHandlers.inc
hedgewars/HHHandlers.inc
--- a/hedgewars/GSHandlers.inc	Tue Nov 09 01:56:22 2010 +0100
+++ b/hedgewars/GSHandlers.inc	Mon Nov 08 22:11:46 2010 -0500
@@ -1441,35 +1441,35 @@
 
     if ((Gear^.State and gsttmpFlag) <> 0) and (Gear^.Health <> 0) then
         if ((Gear^.State and gstAttacking) = 0) then
-        begin
+            begin
             if ((GameTicks and $1F) = 0) then
                 if CheckGearNear(Gear, gtHedgehog, 46, 32) <> nil then Gear^.State := Gear^.State or
                                                                                       gstAttacking
-        end
-    else // gstAttacking <> 0
-    begin
-        AllInactive := false;
-        if (Gear^.Timer and $FF) = 0 then PlaySound(sndMineTick);
-        if Gear^.Timer = 0 then
-        begin
-            if ((Gear^.State and gstWait) <> 0) or
-               (cMineDudPercent = 0) or
-               (getRandom(100) > cMineDudPercent) then
+            end
+        else // gstAttacking <> 0
             begin
-                doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 50, EXPLAutoSound);
-                DeleteGear(Gear)
+            AllInactive := false;
+            if (Gear^.Timer and $FF) = 0 then PlaySound(sndMineTick);
+            if Gear^.Timer = 0 then
+                begin
+                if ((Gear^.State and gstWait) <> 0) or
+                   (cMineDudPercent = 0) or
+                   (getRandom(100) > cMineDudPercent) then
+                    begin
+                    doMakeExplosion(hwRound(Gear^.X), hwRound(Gear^.Y), 50, EXPLAutoSound);
+                    DeleteGear(Gear)
+                    end
+                else
+                    begin
+                    AddVisualGear(hwRound(Gear^.X) - 4  + Random(8), hwRound(Gear^.Y) - 4 - Random(4),
+                    vgtSmoke);
+                    PlaySound(sndVaporize);
+                    Gear^.Health := 0;
+                    end;
+                exit
+                end;
+            dec(Gear^.Timer);
             end
-            else
-            begin
-                AddVisualGear(hwRound(Gear^.X) - 4  + Random(8), hwRound(Gear^.Y) - 4 - Random(4),
-                vgtSmoke);
-                PlaySound(sndVaporize);
-                Gear^.Health := 0;
-            end;
-            exit
-        end;
-        dec(Gear^.Timer);
-    end
     else // gsttmpFlag = 0
         if (TurnTimeLeft = 0) or ((GameFlags and gfInfAttack) <> 0) then Gear^.State := Gear^.State or gsttmpFlag;
 end;
--- a/hedgewars/HHHandlers.inc	Tue Nov 09 01:56:22 2010 +0100
+++ b/hedgewars/HHHandlers.inc	Mon Nov 08 22:11:46 2010 -0500
@@ -255,9 +255,15 @@
                                     PlaySound(sndLowGravity);
                                     cGravity:= cMaxWindSpeed
                                     end;
-                      amExtraDamage: cDamageModifier:= _1_5;
+                      amExtraDamage:begin 
+                                    PlaySound(sndHellishImpact4);
+                                    cDamageModifier:= _1_5
+                                    end;
                       amInvulnerable: Invulnerable:= true;
-                      amExtraTime: TurnTimeLeft:= TurnTimeLeft + 30000;
+                      amExtraTime:  begin
+                                    PlaySound(sndSwitchHog);
+                                    TurnTimeLeft:= TurnTimeLeft + 30000
+                                    end;
                       amLaserSight: cLaserSighting:= true;
                       amVampiric: begin
                                   PlaySound(sndOw1, Team^.voicepack);
@@ -871,7 +877,7 @@
 
 if (Gear^.Health = 0) then
     begin
-    if PrvInactive then
+    if PrvInactive or ((GameFlags and gfInfAttack) <> 0) then
         begin
         Gear^.Timer:= 0;
         FollowGear:= Gear;