diff -r 4e5e725f2c56 -r b7fd7ab8ddf9 share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua Tue Oct 10 03:08:00 2017 +0200 +++ b/share/hedgewars/Data/Scripts/Multiplayer/Construction_Mode.lua Tue Oct 10 16:13:44 2017 +0200 @@ -625,6 +625,9 @@ function CheckProximity(gear) dist = GetDistFromGearToXY(gear, GetX(strucGear[tempID]), GetY(strucGear[tempID])) + if not dist then + return + end -- calculate my real radius if I am an aura if strucCircType[tempID] == 0 then @@ -1080,6 +1083,9 @@ function GetDistFromGearToXY(gear, g2X, g2Y) g1X, g1Y = GetGearPosition(gear) + if not g1X then + return nil + end q = g1X - g2X w = g1Y - g2Y