From 31a537748e7b55882ab9b8b1effab94a94e70d6f Mon Sep 17 00:00:00 2001 From: leka1986 <83298840+leka1986@users.noreply.github.com> Date: Sat, 6 Dec 2025 10:13:37 +0100 Subject: [PATCH] Add check for IniGroup in HandleEventShot Added a check for IniGroup in HandleEventShot to prevent processing if it's not present. Error in 2 instances, attempt to index field IniGroup ( a nil value ) --- Moose Development/Moose/Functional/Shorad.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/Moose Development/Moose/Functional/Shorad.lua b/Moose Development/Moose/Functional/Shorad.lua index 526ff062f..bc5156943 100644 --- a/Moose Development/Moose/Functional/Shorad.lua +++ b/Moose Development/Moose/Functional/Shorad.lua @@ -684,6 +684,7 @@ do local ShootingWeapon = EventData.Weapon -- Identify the weapon fired local ShootingWeaponName = EventData.WeaponName -- return weapon type -- get firing coalition + if not EventData.IniGroup then return self end local weaponcoalition = EventData.IniGroup:GetCoalition() -- get detection probability if self:_CheckCoalition(weaponcoalition) then --avoid overhead on friendly fire