1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 18:29:55 +00:00

Play shield hit sound when the hit is blocked (bug #6645)

This commit is contained in:
Alexei Kotov 2022-11-07 21:52:34 +03:00
parent a2053a625e
commit 180963488f
4 changed files with 7 additions and 2 deletions

View file

@ -9,6 +9,7 @@
Bug #5714: Touch spells cast using ExplodeSpell don't always explode
Bug #5977: Fatigueless NPCs' corpse underwater changes animation on game load
Bug #6427: Enemy health bar disappears before damaging effect ends
Bug #6645: Enemy block sounds align with animation instead of blocked hits
Bug #6661: Saved games that have no preview screenshot cause issues or crashes
Bug #6939: OpenMW-CS: ID columns are too short
Bug #6949: Sun Damage effect doesn't work in quasi exteriors

View file

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

View file

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

View file

@ -1145,8 +1145,6 @@ namespace MWMechanics
mCastingManualSpell = false;
mCanCast = false;
}
else if (groupname == "shield" && action == "block hit")
charClass.block(mPtr);
else if (groupname == "containeropen" && action == "loot")
MWBase::Environment::get().getWindowManager()->pushGuiMode(MWGui::GM_Container, mPtr);
}