From 5461f0094f346315d70224f8b9f762babfc97cbc Mon Sep 17 00:00:00 2001 From: kyklish Date: Wed, 23 Dec 2020 19:57:40 +0200 Subject: [PATCH] Fix ReturnAllNearby(): restore "pt" variable deleted by mistake --- Code/Script.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Code/Script.lua b/Code/Script.lua index f39d9e2..53f7036 100644 --- a/Code/Script.lua +++ b/Code/Script.lua @@ -504,13 +504,14 @@ end ReturnAllNearby = function(radius, sort, class) -- local is faster then global local table_sort = table.sort + local pt = GetTerrainCursor() -- "radius" = meters * 100 radius = radius or 50 -- get objects inherited from "class" within radius -- "guim" = 100 - global var ("meters-to-distance" coefficient) - local list = MapGet(GetTerrainCursor(), radius * guim, class) + local list = MapGet(pt, radius * guim, class) -- sort list custom if sort then