From f80b936e04249273467336780ec0ea2ca51d6051 Mon Sep 17 00:00:00 2001 From: Aaron Warner <34614077+relent0r@users.noreply.github.com> Date: Wed, 1 May 2024 11:45:13 +1200 Subject: [PATCH] Fix incorrect table being inserted into in `AIGetMarkerPositionsAroundLocation` (#6118) --- changelog/snippets/ai.6118.md | 1 + lua/AI/aiutilities.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog/snippets/ai.6118.md diff --git a/changelog/snippets/ai.6118.md b/changelog/snippets/ai.6118.md new file mode 100644 index 0000000000..16f04f43b6 --- /dev/null +++ b/changelog/snippets/ai.6118.md @@ -0,0 +1 @@ +- (#6118) Fix issue with default utility function AIGetMarkerPositionsAroundLocation using an invalid table. diff --git a/lua/AI/aiutilities.lua b/lua/AI/aiutilities.lua index 985a1643ac..bbcba3c613 100644 --- a/lua/AI/aiutilities.lua +++ b/lua/AI/aiutilities.lua @@ -453,7 +453,7 @@ function AIGetMarkerPositionsAroundLocation(aiBrain, markerType, pos, radius, th local markers = AIGetMarkersAroundLocation(aiBrain, markerType, pos, radius, threatMin, threatMax, threatRings, threatType) local retMarkers = {} for _, v in markers do - table.insert(markers, v.Position) + table.insert(retMarkers, v.Position) end return retMarkers