mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-05 06:45:34 +00:00
Play a swish sound when attacking
This commit is contained in:
parent
d8ec813939
commit
705498ec24
1 changed files with 7 additions and 0 deletions
|
@ -486,6 +486,13 @@ bool CharacterController::updateNpcState()
|
|||
animPlaying = mAnimation->getInfo(mCurrentWeapon, &complete);
|
||||
if(mUpperBodyState == UpperCharState_MinAttackToMaxAttack)
|
||||
{
|
||||
if(mAttackType != "shoot")
|
||||
{
|
||||
MWBase::SoundManager *sndMgr = MWBase::Environment::get().getSoundManager();
|
||||
// NOTE: SwishL, SwishM, SwishS - large, medium, small.
|
||||
// Based on weapon weight, speed, or attack strength?
|
||||
sndMgr->playSound3D(mPtr, "SwishL", 1.0f, 1.0f);
|
||||
}
|
||||
stats.setAttackStrength(complete);
|
||||
|
||||
mAnimation->disable(mCurrentWeapon);
|
||||
|
|
Loading…
Reference in a new issue