From ecea18f57c37ff54f6a631c3b60108d4aa102973 Mon Sep 17 00:00:00 2001 From: Asdow <20314541+Asdow@users.noreply.github.com> Date: Mon, 29 Sep 2025 11:05:37 +0300 Subject: [PATCH] Add FIXME to l_ActionInProgress --- Strategic/LuaInitNPCs.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Strategic/LuaInitNPCs.cpp b/Strategic/LuaInitNPCs.cpp index 3e1fb08ec..e00657cb2 100644 --- a/Strategic/LuaInitNPCs.cpp +++ b/Strategic/LuaInitNPCs.cpp @@ -5412,7 +5412,12 @@ static int l_InitFace(lua_State* L) return 0; } -// TODO: fix this mess +// FIXME: Aim of this function is unclear and it's a broken mess +// FindSoldierByProfileID2 call is set to find a soldier with specific profile and restrict search to player controlled mercs +// The function searches through CIV_TEAM which are never player controlled mercs *AND* does not check for profile +// So if a call from lua side comes, the first branch will match for the first civilian who is in sector and active +// Else branch does the same, except it will choose a civilian which doesn't have a profile +// The call to register this as a valid lua function is currently commented out and should remain so until the function is fixed. static int l_ActionInProgress(lua_State* L) { SOLDIERTYPE* pSoldier;