# HG changeset patch # User Wuzzy # Date 1507644824 -7200 # Node ID b7fd7ab8ddf9597f99b1981344842681f1137afa # Parent 4e5e725f2c562478b25122f977c155576e18d97a Construction Mode: Fix Lua error spam when using time box with filters on map diff -r 4e5e725f2c56 -r b7fd7ab8ddf9 ChangeLog.txt --- a/ChangeLog.txt Tue Oct 10 03:08:00 2017 +0200 +++ b/ChangeLog.txt Tue Oct 10 16:13:44 2017 +0200 @@ -77,6 +77,7 @@ * Special tools like structure placer now have their own proper descriptions (instead of Air Attack description, etc.) * Costs for weapon and utility crates were all equal * Remove airplane cursor + * Fix Lua errors when hog goes to time travel while any filter is in map * Many other fixes and tweaks Racer and TechRacer: 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