mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 17:43:52 +00:00
Add property-based mount animation discovery and procedural lean
Mount Animation System: - Property-based jump animation discovery using sequence metadata - Chain linkage scoring (nextAnimation/aliasNext) for accurate detection - Correct loop detection: flags & 0x01 == 0 means looping - Avoids brake/stop animations via blendTime penalties - Works on any mount model without hardcoded animation IDs Mount Physics: - Physics-based jump height: vz = sqrt(2 * g * h) - Configurable MOUNT_JUMP_HEIGHT constant (1.0m default) - Procedural lean into turns for ground mounts - Smooth roll based on turn rate (±14° max, 6x/sec blend) Audio Improvements: - State-machine driven mount sounds (jump, land, rear-up) - Semantic sound methods (no animation ID dependencies) - Debug logging for missing sound files Bug Fixes: - Fixed mount animation sequencing (JumpStart → JumpLoop → JumpEnd) - Fixed animation loop flag interpretation (0x20 vs 0x21) - Rider bone attachment working correctly during all mount actions
This commit is contained in:
parent
3c783d1845
commit
c623fcef51
16 changed files with 1083 additions and 145 deletions
|
|
@ -40,6 +40,11 @@ public:
|
|||
void setFlying(bool flying);
|
||||
void setGrounded(bool grounded);
|
||||
|
||||
// Play semantic mount action sounds (triggered on animation state changes)
|
||||
void playRearUpSound(); // Rear-up flourish (whinny/roar)
|
||||
void playJumpSound(); // Jump start (grunt/snort)
|
||||
void playLandSound(); // Landing (thud/hoof)
|
||||
|
||||
bool isMounted() const { return mounted_; }
|
||||
void setVolumeScale(float scale) { volumeScale_ = scale; }
|
||||
float getVolumeScale() const { return volumeScale_; }
|
||||
|
|
@ -69,6 +74,7 @@ private:
|
|||
bool playingMovementSound_ = false;
|
||||
bool playingIdleSound_ = false;
|
||||
std::chrono::steady_clock::time_point lastSoundUpdate_;
|
||||
std::chrono::steady_clock::time_point lastActionSoundTime_; // Cooldown for action sounds
|
||||
float soundLoopTimer_ = 0.0f;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue