always help if creatures attack

This commit is contained in:
Lilian Jónsdóttir 2020-08-31 21:44:56 -07:00
parent f4c985575e
commit 61d41a8fe2

View file

@ -22,11 +22,11 @@ local function doChecks(attacker, target)
-- if player initiates combat or combat is not against player, do nothing -- 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 == tes3.mobilePlayer or target ~= tes3.mobilePlayer then return false end
-- inCombat is true after player has taken combat actions -- inCombat is true after player has taken combat actions or after combat
-- or after combat has gone on awhile, but hopefully the guards will already be attacking by then -- has gone on awhile, but hopefully the guards will already be attacking by
-- should be fine in cities, but will prevent players from provoking NPCs -- then. Should be fine in cities, but will prevent players from provoking
-- in the wilderness and leading them into town -- NPCs in the wilderness and leading them into town.
if tes3.mobilePlayer.inCombat then if tes3.mobilePlayer.inCombat and attacker.object.objectType == tes3.objectType.npc then
log("Player is in combat, not sure who started it, so not helping.") log("Player is in combat, not sure who started it, so not helping.")
return false return false
end end