don't alert disabled guards

This commit is contained in:
Lilian Jónsdóttir 2021-03-23 18:52:16 -07:00
parent 6a3cc1b05e
commit efb3e6b4bf

View file

@ -72,7 +72,7 @@ local function alertGuards(aggressor, cell)
for npc in cell:iterateReferences(tes3.objectType.npc) do for npc in cell:iterateReferences(tes3.objectType.npc) do
local distance = playerPos:distance(npc.position) local distance = playerPos:distance(npc.position)
if npc.object.isGuard and npc.mobile and distance <= config.combatDistance then if not npc.disabled and npc.object.isGuard and npc.mobile and distance <= config.combatDistance then
log("Alerting %s, %s units away, to the combat!", npc.object.name, distance) log("Alerting %s, %s units away, to the combat!", npc.object.name, distance)
if config.combatDialogue then if config.combatDialogue then