summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index c29d931..a930679 100644
--- a/init.lua
+++ b/init.lua
@@ -222,6 +222,11 @@ local function sed()
z = math.random(playerpos.z - radius, playerpos.z + radius)
}
+ -- keep it in a real circle
+ if (pos.x - playerpos.x) * (pos.x - playerpos.x) + (pos.z - playerpos.z) * (pos.z - playerpos.z) > radius * radius then
+ return
+ end
+
stat_considered = stat_considered + 1
-- force load map