Disable voiced responses to magical friendly hits (bug #7646)

Disable ranged friendly fire
macos_ci_fix
Alexei Kotov 5 months ago
parent 94c052dfef
commit d5428b23d8

@ -101,6 +101,7 @@
Bug #7641: loopgroup loops the animation one time too many for actors
Bug #7642: Items in repair and recharge menus aren't sorted alphabetically
Bug #7643: Can't enchant items with constant effect on self magic effects for non-player character
Bug #7646: Follower voices pain sounds when attacked with magic
Bug #7647: NPC walk cycle bugs after greeting player
Bug #7654: Tooltips for enchantments with invalid effects cause crashes
Bug #7660: Some inconsistencies regarding Invisibility breaking

@ -367,7 +367,9 @@ namespace MWClass
// No retaliation for totally static creatures (they have no movement or attacks anyway)
if (isMobile(ptr))
{
if (MWMechanics::friendlyHit(attacker, ptr, true))
bool complain = sourceType == MWMechanics::DamageSourceType::Melee;
bool supportFriendlyFire = sourceType != MWMechanics::DamageSourceType::Ranged;
if (supportFriendlyFire && MWMechanics::friendlyHit(attacker, ptr, complain))
setOnPcHitMe = false;
else
setOnPcHitMe = MWBase::Environment::get().getMechanicsManager()->actorAttacked(ptr, attacker);

@ -690,7 +690,9 @@ namespace MWClass
if (!attacker.isEmpty() && attacker.getClass().isActor() && !stats.getAiSequence().isInCombat(attacker))
{
stats.setAttacked(true);
if (MWMechanics::friendlyHit(attacker, ptr, true))
bool complain = sourceType == MWMechanics::DamageSourceType::Melee;
bool supportFriendlyFire = sourceType != MWMechanics::DamageSourceType::Ranged;
if (supportFriendlyFire && MWMechanics::friendlyHit(attacker, ptr, complain))
setOnPcHitMe = false;
else
setOnPcHitMe = MWBase::Environment::get().getMechanicsManager()->actorAttacked(ptr, attacker);

Loading…
Cancel
Save