From 716ee7a3b83b2cee12ecafa2bf2fa440784219a4 Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Mon, 27 Feb 2023 15:25:23 +0300 Subject: [PATCH] Fix friendly NPCs outline Closes #45 --- src/game/combat.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/game/combat.cc b/src/game/combat.cc index 15a9da4..47ba0f5 100644 --- a/src/game/combat.cc +++ b/src/game/combat.cc @@ -4605,8 +4605,10 @@ void combat_outline_on() for (index = 0; index < critters_length; index++) { if (critters[index] != obj_dude && (critters[index]->data.critter.combat.results & DAM_DEAD) == 0) { outline_type = OUTLINE_TYPE_HOSTILE; - if (critters[index]->data.critter.combat.team == obj_dude->data.critter.combat.team) { - outline_type = OUTLINE_TYPE_FRIENDLY; + if (perk_level(PERK_FRIENDLY_FOE)) { + if (critters[index]->data.critter.combat.team == obj_dude->data.critter.combat.team) { + outline_type = OUTLINE_TYPE_FRIENDLY; + } } obj_outline_object(critters[index], outline_type, NULL);