RC planes should not pick up frozen crates
authornemo
Mon, 28 Mar 2016 18:19:20 -0400
changeset 11624 56aa40beedf0
parent 11623 515d2d38ab8b
child 11625 9d3e32623567
RC planes should not pick up frozen crates
hedgewars/uGearsHedgehog.pas
--- a/hedgewars/uGearsHedgehog.pas	Mon Mar 28 21:20:11 2016 +0300
+++ b/hedgewars/uGearsHedgehog.pas	Mon Mar 28 18:19:20 2016 -0400
@@ -685,6 +685,8 @@
     vga: PVisualGear;
     ag, gi: PGear;
 begin
+if Gear^.State and gstFrozen <> 0 then exit;
+
 Gear^.Message:= gmDestroy;
 if (Gear^.Pos and posCaseExplode) <> 0 then
     if (Gear^.Pos and posCasePoison) <> 0 then
@@ -1253,7 +1255,7 @@
             HHGear^.Message:= HHGear^.Message or gmAttack;
     // check for case with ammo
     t:= CheckGearNear(HHGear, gtCase, 36, 36);
-    if (t <> nil) and (t^.State and gstFrozen = 0) then
+    if (t <> nil) then
         PickUp(HHGear, t)
     end;