1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-03 12:45:38 +00:00

Merge pull request #2317 from Capostrophic/sound

Only play miss sound for player attacks (bug #4969)
This commit is contained in:
Andrei Kortunov 2019-04-11 07:52:18 +04:00 committed by GitHub
commit 04bee2b2fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View file

@ -57,6 +57,7 @@
Bug #4947: Player character doesn't use lip animation
Bug #4948: Footstep sounds while levitating on ground level
Bug #4963: Enchant skill progress is incorrect
Bug #4969: "Miss" sound plays for any actor
Feature #2229: Improve pathfinding AI
Feature #3442: Default values for fallbacks from ini file
Feature #3610: Option to invert X axis

View file

@ -376,7 +376,8 @@ namespace MWClass
if (!successful)
{
// Missed
MWBase::Environment::get().getSoundManager()->playSound3D(ptr, "miss", 1.0f, 1.0f);
if (!attacker.isEmpty() && attacker == MWMechanics::getPlayer())
MWBase::Environment::get().getSoundManager()->playSound3D(ptr, "miss", 1.0f, 1.0f);
return;
}

View file

@ -710,7 +710,8 @@ namespace MWClass
if (!successful)
{
// Missed
sndMgr->playSound3D(ptr, "miss", 1.0f, 1.0f);
if (!attacker.isEmpty() && attacker == MWMechanics::getPlayer())
sndMgr->playSound3D(ptr, "miss", 1.0f, 1.0f);
return;
}