mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-28 03:40:04 +00:00
Merge branch 'block' into 'master'
Blocking animation and sound fixes (bug #6645) Closes #6645 See merge request OpenMW/openmw!2500
This commit is contained in:
commit
7496217986
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
@ -385,9 +385,17 @@ namespace MWMechanics
|
||||
bool knockout = stats.getFatigue().getCurrent() < 0 || stats.getFatigue().getBase() == 0;
|
||||
bool recovery = stats.getHitRecovery();
|
||||
bool knockdown = stats.getKnockedDown();
|
||||
bool block = stats.getBlock();
|
||||
bool block = stats.getBlock() && !knockout && !recovery && !knockdown;
|
||||
bool isSwimming = world->isSwimming(mPtr);
|
||||
|
||||
stats.setBlock(false);
|
||||
|
||||
if (mPtr == getPlayer() && mHitState == CharState_Block && block)
|
||||
{
|
||||
mHitState = CharState_None;
|
||||
resetCurrentIdleState();
|
||||
}
|
||||
|
||||
if (mHitState != CharState_None)
|
||||
{
|
||||
if (!mAnimation->isPlaying(mCurrentHit))
|
||||
@ -396,7 +404,6 @@ namespace MWMechanics
|
||||
mCurrentHit.clear();
|
||||
stats.setKnockedDown(false);
|
||||
stats.setHitRecovery(false);
|
||||
stats.setBlock(false);
|
||||
resetCurrentIdleState();
|
||||
}
|
||||
else if (isKnockedOut())
|
||||
@ -451,7 +458,6 @@ namespace MWMechanics
|
||||
mCurrentHit.clear();
|
||||
stats.setKnockedDown(false);
|
||||
stats.setHitRecovery(false);
|
||||
stats.setBlock(false);
|
||||
resetCurrentIdleState();
|
||||
return;
|
||||
}
|
||||
@ -1145,8 +1151,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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user