# HG changeset patch
# User nemo
# Date 1459203560 14400
# Node ID 56aa40beedf0ed615f54f97ed82964d291bf9e34
# Parent  515d2d38ab8b46e4923de0a74dbc23009ca4256e
RC planes should not pick up frozen crates

diff -r 515d2d38ab8b -r 56aa40beedf0 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;