From 08b43e0bd226e49ab515bab1ba34a90ce2507dd4 Mon Sep 17 00:00:00 2001 From: bgkillas Date: Tue, 29 Oct 2024 22:35:29 -0400 Subject: [PATCH] avoid teleporters as notplayer --- quant.ew/files/system/notplayer_ai/notplayer_ai.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/quant.ew/files/system/notplayer_ai/notplayer_ai.lua b/quant.ew/files/system/notplayer_ai/notplayer_ai.lua index 39405946..ae0f5649 100644 --- a/quant.ew/files/system/notplayer_ai/notplayer_ai.lua +++ b/quant.ew/files/system/notplayer_ai/notplayer_ai.lua @@ -1389,6 +1389,15 @@ local function update() end state.stationary_check = {} end + if GameGetFrameNum() % 10 == 6 then + for _, ent in ipairs(EntityGetInRadius(mx, my, 256)) do + if EntityGetFirstComponentIncludingDisabled(ent, "TeleportComponent") ~= nil and not table.contains(state.ignore, ent) then + table.insert(state.ignore, ent) + local x, y = EntityGetTransform(ent) + table.insert(state.stay_away, {x, y, ent}) + end + end + end end function module.on_world_update()