Add cooldown for unintentional emotes (#19078)

* Add cooldown for unintentional emotes

* Oops, let's try that again.
- Adds a separate cooldown system for unintentional emotes.
- Unintentional emotes will fire audio at most once every 2 seconds.
- Emotes like deathgasp can override this out of necessity.
- Scream's is longer because...come on.

* The part that makes the rest of it actualy work
This commit is contained in:
Luc
2022-09-25 17:31:26 +01:00
committed by GitHub
parent 6aefc49682
commit 96aab66dc6
7 changed files with 43 additions and 18 deletions
+4 -1
View File
@@ -37,9 +37,12 @@
// Each mob can only play an emote with audio every AUDIO_EMOTE_COOLDOWN seconds, unless a given emote overrides its own audio cooldown.
/// Default cooldown for audio that comes from emotes.
/// Default cooldown for emote-emitted audio.
#define AUDIO_EMOTE_COOLDOWN (5 SECONDS)
/// Cooldown for emotes that are emitted unintentionally, to prevent them from getting audibly spammy.
#define AUDIO_EMOTE_UNINTENTIONAL_COOLDOWN (2 SECONDS)
// Emote parameter types
// If nothing is passed in for a target, this can determine the possible target.