Merge branch 'blockofcoal' into 'master'

Play blocked hit sound on the victim, not the attacker

See merge request OpenMW/openmw!2551
iwyu_full
psi29a 2 years ago
commit 8b0eba8906

@ -357,7 +357,7 @@ namespace MWClass
if (MWMechanics::blockMeleeAttack(ptr, victim, weapon, damage, attackStrength)) if (MWMechanics::blockMeleeAttack(ptr, victim, weapon, damage, attackStrength))
{ {
damage = 0; damage = 0;
block(ptr); victim.getClass().block(victim);
} }
MWMechanics::diseaseContact(victim, ptr); MWMechanics::diseaseContact(victim, ptr);

@ -702,7 +702,7 @@ namespace MWClass
if (MWMechanics::blockMeleeAttack(ptr, victim, weapon, damage, attackStrength)) if (MWMechanics::blockMeleeAttack(ptr, victim, weapon, damage, attackStrength))
{ {
damage = 0; damage = 0;
block(ptr); victim.getClass().block(victim);
} }
if (victim == MWMechanics::getPlayer() && MWBase::Environment::get().getWorld()->getGodModeState()) if (victim == MWMechanics::getPlayer() && MWBase::Environment::get().getWorld()->getGodModeState())

Loading…
Cancel
Save