sheepluva suggestion for frozen barrel behaviour. untested.
authornemo
Wed, 22 May 2013 09:46:42 -0400
changeset 9045 6561c42399d3
parent 9044 8a829987d514
child 9046 f8ea1b929b72
sheepluva suggestion for frozen barrel behaviour. untested.
hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Wed May 22 06:17:06 2013 -0400
+++ b/hedgewars/GSHandlers.inc	Wed May 22 09:46:42 2013 -0400
@@ -1586,6 +1586,7 @@
     if (Gear^.dY.QWordValue = 0) and (Gear^.dY.QWordValue = 0) and (TestCollisionYwithGear(Gear, 1) = 0) then
         SetLittle(Gear^.dY);
     Gear^.State := Gear^.State or gstAnimation;
+    if Gear^.Health < cBarrelHealth then Gear^.State:= Gear^.State and not gstFrozen;
 
     if ((Gear^.dX.QWordValue <> 0)
     or (Gear^.dY.QWordValue <> 0))  then
@@ -1671,6 +1672,7 @@
                 Gear^.Message := Gear^.Message and (not (gmLJump or gmHJump));
         exit
         end;
+    if (k = gtExplosives) and (Gear^.Health < cBarrelHealth) then Gear^.State:= Gear^.State and not gstFrozen;
 
     if ((k <> gtExplosives) and (Gear^.Damage > 0)) or ((k = gtExplosives) and (Gear^.Health<=0)) then
         begin
@@ -5230,6 +5232,8 @@
                                 DeleteCI(iter);
                                 AddGearCI(iter)
                                 end
+                            else // gtExplosives
+                                iter^.Health:= iter^.Health + cBarrelHealth
                             end;
                         iter:= iter^.NextGear
                         end;