hedgewars/uGearsHandlersMess.pas
changeset 13290 fd1017c85dd4
parent 13286 36243bd726df
child 13323 9071600f7b22
--- a/hedgewars/uGearsHandlersMess.pas	Tue Mar 27 17:32:23 2018 +0200
+++ b/hedgewars/uGearsHandlersMess.pas	Tue Mar 27 13:45:58 2018 -0400
@@ -6320,10 +6320,6 @@
 if Gear^.Timer > 0 then dec(Gear^.Timer)
 else
     begin
-    if Gear^.Pos = posCaseUtility then
-        a:= GetUtility(Gear^.Hedgehog)
-    else
-        a:= GetAmmo(Gear^.Hedgehog);
     CheckSum:= CheckSum xor GameTicks;
     gi := GearsList;
     while gi <> nil do
@@ -6334,6 +6330,9 @@
             gi^.State:= gi^.State and (not gstTmpFlag);
         gi := gi^.NextGear
         end;
+    if Gear^.Pos = posCaseUtility then
+         a:= GetUtility(Gear^.Hedgehog)
+    else a:= GetAmmo(Gear^.Hedgehog);
     AddPickup(Gear^.Hedgehog^, a, Gear^.Power, hwRound(Gear^.X), hwRound(Gear^.Y));
     DeleteGear(Gear)
     end;