share/hedgewars/Data/Scripts/Utils.lua
changeset 14231 74bf2d906097
parent 13665 5664650befcd
child 14475 2113296b7a29
--- a/share/hedgewars/Data/Scripts/Utils.lua	Mon Nov 19 00:19:21 2018 +0100
+++ b/share/hedgewars/Data/Scripts/Utils.lua	Mon Nov 19 00:54:36 2018 +0100
@@ -3,7 +3,7 @@
 --[[ FUNCTIONS ]]
 -- Check if a gear is inside a box
 function gearIsInBox(gear, x, y, w, h)
-    gx, gy = GetGearPosition(gear)
+    local gx, gy = GetGearPosition(gear)
     if gx >= x and gy >= y and gx <= x + w and gy <= y + h then
         return true
     end
@@ -12,7 +12,7 @@
 
 -- Check if a gear is inside a circle
 function gearIsInCircle(gear, x, y, r, useRadius)
-    gx, gy = GetGearPosition(gear)
+    local gx, gy = GetGearPosition(gear)
     if useRadius then
         r = r + GetGearRadius(gear)
     end