make it easier to do portal shoppa, ensure structure doesn't show up by accident in a weaponset
authornemo
Sun, 21 Aug 2011 22:41:10 -0400
changeset 5640 07676ee23aff
parent 5638 e35ba2a400d8
child 5642 0ce9e01bae56
child 5643 1617a8636451
make it easier to do portal shoppa, ensure structure doesn't show up by accident in a weaponset
hedgewars/HHHandlers.inc
hedgewars/uAmmos.pas
--- a/hedgewars/HHHandlers.inc	Sun Aug 21 19:29:04 2011 -0400
+++ b/hedgewars/HHHandlers.inc	Sun Aug 21 22:41:10 2011 -0400
@@ -741,8 +741,11 @@
 var da: LongWord;
 begin
 with HHGear^.Hedgehog^ do
-    if (CurAmmoType = amRope)
-    and ((HHGear^.State and (gstMoving or gstHHJumping)) = gstMoving) then da:= 2 else da:= 1;
+    if ((CurAmmoType = amRope) and 
+        ((HHGear^.State and (gstMoving or gstHHJumping)) = gstMoving)) or
+       ((CurAmmoType = amPortalGun) and 
+        ((HHGear^.State and gstMoving) <> 0)) then da:= 2
+    else da:= 1;
 
 if (((HHGear^.Message and gmPrecise) = 0) or ((GameTicks mod 5) = 1)) then
     if ((HHGear^.Message and gmUp) <> 0) and (HHGear^.Angle >= CurMinAngle + da) then dec(HHGear^.Angle, da)
--- a/hedgewars/uAmmos.pas	Sun Aug 21 19:29:04 2011 -0400
+++ b/hedgewars/uAmmos.pas	Sun Aug 21 22:41:10 2011 -0400
@@ -111,7 +111,8 @@
            ((a = amInvulnerable) and ((GameFlags and gfInvulnerable) <> 0)) or
            ((a = amLaserSight) and ((GameFlags and gfLaserSight) <> 0)) or
            ((a = amVampiric) and ((GameFlags and gfVampiric) <> 0)) or
-           ((a = amExtraTime) and (cHedgehogTurnTime >= 1000000)) then
+           ((a = amExtraTime) and (cHedgehogTurnTime >= 1000000)) or
+            (a = amStructure) then
             begin
             cnt:= 0;
             Ammoz[a].Probability:= 0