this should probably sidestep that thing unc0rr keeps bringing up. untested. but then, I've never had it happen. I think what happens is onGameTick20 is called in same tick as onNewTurn and before it...
authornemo
Tue, 24 Oct 2017 14:14:00 -0400
changeset 12758 327f71313e04
parent 12757 0e425574bd5f
child 12759 c7224d202e8b
this should probably sidestep that thing unc0rr keeps bringing up. untested. but then, I've never had it happen. I think what happens is onGameTick20 is called in same tick as onNewTurn and before it...
share/hedgewars/Data/Maps/ClimbHome/map.lua
--- a/share/hedgewars/Data/Maps/ClimbHome/map.lua	Tue Oct 24 19:45:11 2017 +0200
+++ b/share/hedgewars/Data/Maps/ClimbHome/map.lua	Tue Oct 24 14:14:00 2017 -0400
@@ -250,6 +250,11 @@
 
 function onGameTick20()
     local x,y
+
+    if gameTime - startTime < 40 then 
+        return
+    end
+
     if math.random(20) == 1 then AddVisualGear(2012,56,vgtSmoke,0,false) end
     if CurrentHedgehog == dummyHog and dummySkip ~= 0 and dummySkip < GameTime then
         ParseCommand("/skip")