guards don't attack dead actors
This commit is contained in:
parent
57b91895f5
commit
d019558a71
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue