From d019558a71a658ae1dbde5839b8a5a3af2a5b972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lilian=20J=C3=B3nsd=C3=B3ttir?= Date: Sun, 22 Aug 2021 00:20:30 -0700 Subject: [PATCH] guards don't attack dead actors --- MWSE/mods/celediel/MoreAttentiveGuards/combat.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/MWSE/mods/celediel/MoreAttentiveGuards/combat.lua b/MWSE/mods/celediel/MoreAttentiveGuards/combat.lua index 929e6cf..9ddbabd 100644 --- a/MWSE/mods/celediel/MoreAttentiveGuards/combat.lua +++ b/MWSE/mods/celediel/MoreAttentiveGuards/combat.lua @@ -22,6 +22,11 @@ local function doChecks(attacker, target) -- if player initiates combat or combat is not against player, do nothing if attacker == tes3.mobilePlayer or target ~= tes3.mobilePlayer then return false end + if attacker.isDead or target.isDead then + log("Someone's dead, not helping.") + return false + end + -- inCombat is true after player has taken combat actions or after combat -- has gone on awhile, but hopefully the guards will already be attacking by -- then. Should be fine in cities, but will prevent players from provoking