mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-23 23:09:44 +00:00
Allow creatures to play Attack voiceover
This commit is contained in:
parent
cec55119ca
commit
b33016d89f
1 changed files with 6 additions and 6 deletions
|
@ -555,13 +555,13 @@ namespace MWMechanics
|
|||
if (actor.getClass().isNpc())
|
||||
{
|
||||
baseDelay = store.get<ESM::GameSetting>().find("fCombatDelayNPC")->mValue.getFloat();
|
||||
}
|
||||
|
||||
//say a provoking combat phrase
|
||||
int chance = store.get<ESM::GameSetting>().find("iVoiceAttackOdds")->mValue.getInteger();
|
||||
if (Misc::Rng::roll0to99() < chance)
|
||||
{
|
||||
MWBase::Environment::get().getDialogueManager()->say(actor, "attack");
|
||||
}
|
||||
// Say a provoking combat phrase
|
||||
const int iVoiceAttackOdds = store.get<ESM::GameSetting>().find("iVoiceAttackOdds")->mValue.getInteger();
|
||||
if (Misc::Rng::roll0to99() < iVoiceAttackOdds)
|
||||
{
|
||||
MWBase::Environment::get().getDialogueManager()->say(actor, "attack");
|
||||
}
|
||||
mAttackCooldown = std::min(baseDelay + 0.01 * Misc::Rng::roll0to99(), baseDelay + 0.9);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue