mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +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
|
|
@ -425,6 +425,10 @@ public:
|
|||
uint32_t getPlayerLevel() const { return serverPlayerLevel_; }
|
||||
static uint32_t killXp(uint32_t playerLevel, uint32_t victimLevel);
|
||||
|
||||
// Server time (for deterministic moon phases, etc.)
|
||||
float getGameTime() const { return gameTime_; }
|
||||
float getTimeSpeed() const { return timeSpeed_; }
|
||||
|
||||
// Player skills
|
||||
const std::map<uint32_t, PlayerSkill>& getPlayerSkills() const { return playerSkills_; }
|
||||
const std::string& getSkillName(uint32_t skillId) const;
|
||||
|
|
@ -1096,6 +1100,11 @@ private:
|
|||
uint32_t serverPlayerLevel_ = 1;
|
||||
static uint32_t xpForLevel(uint32_t level);
|
||||
|
||||
// ---- Server time tracking (for deterministic celestial/sky systems) ----
|
||||
float gameTime_ = 0.0f; // Server game time in seconds
|
||||
float timeSpeed_ = 0.0166f; // Time scale (default: 1 game day = 1 real hour)
|
||||
void handleLoginSetTimeSpeed(network::Packet& packet);
|
||||
|
||||
// ---- Player skills ----
|
||||
std::map<uint32_t, PlayerSkill> playerSkills_;
|
||||
std::unordered_map<uint32_t, std::string> skillLineNames_;
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ enum class Opcode : uint16_t {
|
|||
SMSG_CHAR_DELETE = 0x03C,
|
||||
SMSG_PONG = 0x1DD,
|
||||
SMSG_LOGIN_VERIFY_WORLD = 0x236,
|
||||
SMSG_LOGIN_SETTIMESPEED = 0x042,
|
||||
SMSG_ACCOUNT_DATA_TIMES = 0x209,
|
||||
SMSG_FEATURE_SYSTEM_STATUS = 0x3ED,
|
||||
SMSG_MOTD = 0x33D,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue