More tweaking, make blowtorch interact badly w/ explosives
authornemo
Fri, 05 Mar 2010 02:28:03 +0000
changeset 2937 da06c25edf1d
parent 2936 ed4c315dab2d
child 2938 451f917ac46c
More tweaking, make blowtorch interact badly w/ explosives
hedgewars/GSHandlers.inc
hedgewars/uGears.pas
--- a/hedgewars/GSHandlers.inc	Fri Mar 05 02:23:57 2010 +0000
+++ b/hedgewars/GSHandlers.inc	Fri Mar 05 02:28:03 2010 +0000
@@ -1264,13 +1264,13 @@
     V:= hwSqr(Gear^.dX) + hwSqr(Gear^.dY);
     //if V > _0_03 then Gear^.State:= Gear^.State or gstAnimation;
     if hwAbs(Gear^.dX) > _0_15 then Gear^.State:= Gear^.State or gstAnimation;
+    if ((Gear^.State and gstAnimation) = 0) or (hwAbs(Gear^.dX) < _0_001) then Gear^.dX:= _0;
     if ((Gear^.State and gstAnimation) <> 0) and (Gear^.dX.QWordValue <> 0) and (Gear^.dY.QWordValue <> 0)  then
         begin
         AllInactive:= false;
         doStepFallingGear(Gear);
         CalcRotationDirAngle(Gear)
         end;
-	if hwAbs(Gear^.dX) < _0_0002 then Gear^.dX:= _0;
     
 	if ((Gear^.Health * 100 div cBarrelHealth) < random(90)) and ((GameTicks and $FF) = 0) then
 		AddVisualGear(hwRound(Gear^.X) - 16 + Random(32), hwRound(Gear^.Y) - 2, vgtSmoke);
--- a/hedgewars/uGears.pas	Fri Mar 05 02:23:57 2010 +0000
+++ b/hedgewars/uGears.pas	Fri Mar 05 02:28:03 2010 +0000
@@ -1825,6 +1825,7 @@
                         ApplyDamage(Gear, tmpDmg)
                     else
                         Gear^.State:= Gear^.State or gstWinner;
+                    if (Gear^.Kind = gtExplosives) and (Ammo^.Kind = gtBlowtorch) then ApplyDamage(Gear, tmpDmg * 100); // crank up damage for explosives + blowtorch
 
 					DeleteCI(Gear);
                     if (Gear^.Kind = gtHedgehog) and PHedgehog(Gear^.Hedgehog)^.King then