share/hedgewars/Data/Scripts/Animate.lua
changeset 14646 835072bcbfb6
parent 14626 153c12b9051b
child 15094 7732013ce64c
--- a/share/hedgewars/Data/Scripts/Animate.lua	Thu Jan 17 01:24:34 2019 +0100
+++ b/share/hedgewars/Data/Scripts/Animate.lua	Thu Jan 17 01:35:43 2019 +0100
@@ -235,6 +235,10 @@
 end
 
 function AnimOutOfNowhere(gear, destX, destY)
+  if (not destX) or (not destY) then
+    destX = GetX(gear)
+    destY = GetY(gear)
+  end
   AnimSetGearPosition(gear, destX, destY)
   AddVisualGear(destX, destY, vgtBigExplosion, 0, false)
   PlaySound(sndExplosion)