mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 07:53:51 +00:00
Merge pull request #2451 from Capostrophic/sounds
Fix combat sound inconsistencies (bugs #5092, #5093)
This commit is contained in:
commit
69277b52d0
3 changed files with 18 additions and 13 deletions
|
@ -112,6 +112,8 @@
|
||||||
Bug #5074: Paralyzed actors greet the player
|
Bug #5074: Paralyzed actors greet the player
|
||||||
Bug #5075: Enchanting cast style can be changed if there's no object
|
Bug #5075: Enchanting cast style can be changed if there's no object
|
||||||
Bug #5082: Scrolling with controller in GUI mode is broken
|
Bug #5082: Scrolling with controller in GUI mode is broken
|
||||||
|
Bug #5092: NPCs with enchanted weapons play sound when out of charges
|
||||||
|
Bug #5093: Hand to hand sound plays on knocked out enemies
|
||||||
Feature #1774: Handle AvoidNode
|
Feature #1774: Handle AvoidNode
|
||||||
Feature #2229: Improve pathfinding AI
|
Feature #2229: Improve pathfinding AI
|
||||||
Feature #3025: Analogue gamepad movement controls
|
Feature #3025: Analogue gamepad movement controls
|
||||||
|
|
|
@ -441,7 +441,7 @@ namespace MWMechanics
|
||||||
if(sound)
|
if(sound)
|
||||||
sndMgr->playSound3D(victim, sound->mId, 1.0f, 1.0f);
|
sndMgr->playSound3D(victim, sound->mId, 1.0f, 1.0f);
|
||||||
}
|
}
|
||||||
else
|
else if (!healthdmg)
|
||||||
sndMgr->playSound3D(victim, "Hand To Hand Hit", 1.0f, 1.0f);
|
sndMgr->playSound3D(victim, "Hand To Hand Hit", 1.0f, 1.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -838,21 +838,24 @@ namespace MWMechanics
|
||||||
if (item.getCellRef().getEnchantmentCharge() < castCost)
|
if (item.getCellRef().getEnchantmentCharge() < castCost)
|
||||||
{
|
{
|
||||||
if (mCaster == getPlayer())
|
if (mCaster == getPlayer())
|
||||||
|
{
|
||||||
MWBase::Environment::get().getWindowManager()->messageBox("#{sMagicInsufficientCharge}");
|
MWBase::Environment::get().getWindowManager()->messageBox("#{sMagicInsufficientCharge}");
|
||||||
|
|
||||||
// Failure sound
|
// Failure sound
|
||||||
int school = 0;
|
int school = 0;
|
||||||
if (!enchantment->mEffects.mList.empty())
|
if (!enchantment->mEffects.mList.empty())
|
||||||
{
|
{
|
||||||
short effectId = enchantment->mEffects.mList.front().mEffectID;
|
short effectId = enchantment->mEffects.mList.front().mEffectID;
|
||||||
const ESM::MagicEffect* magicEffect = MWBase::Environment::get().getWorld()->getStore().get<ESM::MagicEffect>().find(effectId);
|
const ESM::MagicEffect* magicEffect = MWBase::Environment::get().getWorld()->getStore().get<ESM::MagicEffect>().find(effectId);
|
||||||
school = magicEffect->mData.mSchool;
|
school = magicEffect->mData.mSchool;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const std::string schools[] = {
|
||||||
|
"alteration", "conjuration", "destruction", "illusion", "mysticism", "restoration"
|
||||||
|
};
|
||||||
|
MWBase::SoundManager *sndMgr = MWBase::Environment::get().getSoundManager();
|
||||||
|
sndMgr->playSound3D(mCaster, "Spell Failure " + schools[school], 1.0f, 1.0f);
|
||||||
}
|
}
|
||||||
static const std::string schools[] = {
|
|
||||||
"alteration", "conjuration", "destruction", "illusion", "mysticism", "restoration"
|
|
||||||
};
|
|
||||||
MWBase::SoundManager *sndMgr = MWBase::Environment::get().getSoundManager();
|
|
||||||
sndMgr->playSound3D(mCaster, "Spell Failure " + schools[school], 1.0f, 1.0f);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Reduce charge
|
// Reduce charge
|
||||||
|
|
Loading…
Reference in a new issue