Fix setting gravity multiplied by million for a moment of time on new turn on certain circumstances
authorunc0rr
Fri, 02 Jan 2015 01:13:22 +0300
changeset 10738 62659c427e5d
parent 10736 5b7cf9fcb47e
child 10740 c9db53de9c3b
Fix setting gravity multiplied by million for a moment of time on new turn on certain circumstances
share/hedgewars/Data/Scripts/Multiplayer/Gravity.lua
--- a/share/hedgewars/Data/Scripts/Multiplayer/Gravity.lua	Thu Jan 01 12:43:00 2015 -0500
+++ b/share/hedgewars/Data/Scripts/Multiplayer/Gravity.lua	Fri Jan 02 01:13:22 2015 +0300
@@ -17,7 +17,12 @@
 
 
 function grav_onNewTurn()
-    SetGravity(gravity)
+    if delta ~= nil and period == nil then 
+      SetGravity(gravity)
+    else
+      SetGravity(div(gravity, mln))
+    end
+    
     wdGameTicks = GameTime
     
     if script2_onNewTurn ~= nil then