1
0
Fork 0
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:
Chris Robinson 2013-07-24 10:34:53 -07:00
parent d8ec813939
commit 705498ec24

View file

@ -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);