hedgewars/uGears.pas
changeset 14789 185f07ec4d12
parent 14786 ba8dd081359d
child 14799 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