Add mount idle fidget animations and ambient sounds

Implements WoW-style mount idle behavior when player is stationary:
- Fidget animations: discovered via property search (non-looping, 500-1500ms, stationary, IDs 1-10)
- Triggers random fidget every 6-12 seconds when standing still
- Ambient idle sounds: snorts/breaths for ground mounts, soft wing sounds for flyers
- Triggers random idle sound every 8-15 seconds when stationary
- Both systems reset timers on movement to avoid triggering while riding
This commit is contained in:
Kelsi 2026-02-10 19:53:23 -08:00
parent 4b9a2394d5
commit 8d8e780607
4 changed files with 74 additions and 1 deletions

View file

@ -54,6 +54,7 @@ public:
void playRearUpSound(); // Rear-up flourish (whinny/roar)
void playJumpSound(); // Jump start (grunt/snort)
void playLandSound(); // Landing (thud/hoof)
void playIdleSound(); // Ambient idle (snort/stomp/breath)
bool isMounted() const { return mounted_; }
void setVolumeScale(float scale) { volumeScale_ = scale; }

View file

@ -3,6 +3,7 @@
#include <memory>
#include <string>
#include <cstdint>
#include <vector>
#include <glm/glm.hpp>
namespace wowee {
@ -313,6 +314,7 @@ private:
uint32_t rearUp = 0; // Rear-up / special flourish
uint32_t run = 0; // Run animation (discovered, don't assume)
uint32_t stand = 0; // Stand animation (discovered)
std::vector<uint32_t> fidgets; // Idle fidget animations (head turn, tail swish, etc.)
};
enum class MountAction { None, Jump, RearUp };
@ -326,6 +328,8 @@ private:
MountAction mountAction_ = MountAction::None; // Current mount action (jump/rear-up)
uint32_t mountActionPhase_ = 0; // 0=start, 1=loop, 2=end (for jump chaining)
MountAnimSet mountAnims_; // Cached animation IDs for current mount
float mountIdleFidgetTimer_ = 0.0f; // Timer for random idle fidgets
float mountIdleSoundTimer_ = 0.0f; // Timer for ambient idle sounds
bool taxiFlight_ = false;
bool terrainEnabled = true;