hedgewars/uGears.pas
changeset 12933 fa402ce826c2
parent 12925 21827fc9ca98
child 12943 b075ad6112c9
--- a/hedgewars/uGears.pas	Thu Feb 08 15:44:08 2018 +0100
+++ b/hedgewars/uGears.pas	Thu Feb 08 18:10:39 2018 +0100
@@ -62,7 +62,7 @@
 
 var delay: LongWord;
     delay2: LongWord;
-    step: (stDelay, stChDmg, stSweep, stTurnReact,
+    step: (stInit, stDelay, stChDmg, stSweep, stTurnReact,
     stAfterDelay, stChWin, stWater, stChWin2, stHealth,
     stSpawn, stNTurn);
     NewTurnTick: LongWord;
@@ -253,6 +253,11 @@
 
 if AllInactive then
 case step of
+    stInit:
+        begin
+        ScriptCall('onEndTurn');
+        inc(step)
+        end;
     stDelay:
         begin
         if delay = 0 then