hedgewars/uGears.pas
changeset 14773 185f07ec4d12
parent 14770 ba8dd081359d
child 14783 bbec6b28d072
--- a/hedgewars/uGears.pas	Mon Apr 08 15:27:40 2019 +0200
+++ b/hedgewars/uGears.pas	Mon Apr 08 15:51:42 2019 +0200
@@ -222,7 +222,7 @@
 end;
 
 procedure ProcessGears;
-var t: PGear;
+var t, tmpGear: PGear;
     i, j, AliveCount: LongInt;
     s: ansistring;
     prevtime: LongWord;
@@ -477,7 +477,11 @@
         begin
         if (not isInMultiShoot) then
             begin
-            SpawnBoxOfSmth;
+            tmpGear:= SpawnBoxOfSmth;
+            if tmpGear <> nil then
+                ScriptCall('onCaseDrop', tmpGear^.uid)
+            else
+                ScriptCall('onCaseDrop');
             delay:= delayFinal;
             inc(step);
             end