Prevent escape
authornemo
Sat, 06 Nov 2010 22:03:12 -0400
changeset 4155 9160dbe77118
parent 4154 20b300499340
child 4156 bb1a82bbe9e3
Prevent escape
hedgewars/GSHandlers.inc
hedgewars/uGears.pas
--- a/hedgewars/GSHandlers.inc	Sat Nov 06 21:00:37 2010 -0400
+++ b/hedgewars/GSHandlers.inc	Sat Nov 06 22:03:12 2010 -0400
@@ -3068,6 +3068,7 @@
     // For some reason I need to reapply followgear here, something else grabs it otherwise.
     if not bShowAmmoMenu and not CurrentTeam^.ExtDriven then FollowGear := HHGear;
 
+    if not isUnderWater and hasBorder and ((HHGear^.X < _0) or (hwRound(HHGear^.X) > LAND_WIDTH)) then HHGear^.dY.isNegative:= false;
     if ((Gear^.State and gsttmpFlag) = 0) or (HHGear^.dY < _0) then doStepHedgehogMoving(HHGear);
 
     if // (Gear^.Health = 0)
--- a/hedgewars/uGears.pas	Sat Nov 06 21:00:37 2010 -0400
+++ b/hedgewars/uGears.pas	Sat Nov 06 22:03:12 2010 -0400
@@ -1730,8 +1730,6 @@
         FollowGear:= AddGear(0, 0, gtCase, 0, _0, _0, 0);
         t:= GetRandom(t);
         i:= Low(TAmmoType);
-        if (Ammoz[i].Ammo.Propz and ammoprop_Utility) = 0 then
-            dec(t, Ammoz[i].Probability);
         while t >= 0 do
           begin
           inc(i);
@@ -1751,8 +1749,6 @@
         FollowGear:= AddGear(0, 0, gtCase, 0, _0, _0, 0);
         t:= GetRandom(t);
         i:= Low(TAmmoType);
-        if (Ammoz[i].Ammo.Propz and ammoprop_Utility) <> 0 then
-            dec(t, Ammoz[i].Probability);
         while t >= 0 do
           begin
           inc(i);