Fix taxi griffin animation and improve mount texture loading

Use FlyForward/FlyIdle animations (IDs 158/159) for taxi mounts instead
of ground movement animations (Stand/Run). Add detailed mount texture
debug logging and improve fallback texture resolution for gryphon/wyvern
models with multiple skin slots.
This commit is contained in:
Kelsi 2026-02-17 01:16:23 -08:00
parent 0b28dbf140
commit eace8753c6
2 changed files with 108 additions and 28 deletions

View file

@ -948,6 +948,8 @@ void Renderer::updateCharacterAnimation() {
constexpr uint32_t ANIM_SWIM_IDLE = 41; // Treading water (SwimIdle)
constexpr uint32_t ANIM_SWIM = 42; // Swimming forward (Swim)
constexpr uint32_t ANIM_MOUNT = 91; // Seated on mount
constexpr uint32_t ANIM_FLY_IDLE = 158; // Flying mount idle/hover
constexpr uint32_t ANIM_FLY_FORWARD = 159; // Flying mount forward
CharAnimState newState = charAnimState;
@ -1019,6 +1021,25 @@ void Renderer::updateCharacterAnimation() {
float curMountTime = 0, curMountDur = 0;
bool haveMountState = characterRenderer->getAnimationState(mountInstanceId_, curMountAnim, curMountTime, curMountDur);
// Taxi flight: use flying animations instead of ground movement
if (taxiFlight_) {
// Prefer FlyForward, fall back to FlyIdle, then ANIM_RUN
if (characterRenderer->hasAnimation(mountInstanceId_, ANIM_FLY_FORWARD)) {
mountAnimId = ANIM_FLY_FORWARD;
} else if (characterRenderer->hasAnimation(mountInstanceId_, ANIM_FLY_IDLE)) {
mountAnimId = ANIM_FLY_IDLE;
} else {
mountAnimId = ANIM_RUN;
}
if (!haveMountState || curMountAnim != mountAnimId) {
characterRenderer->playAnimation(mountInstanceId_, mountAnimId, true);
}
// Skip all ground mount logic (jumps, fidgets, etc.)
goto taxi_mount_done;
}
// Check for jump trigger - use cached per-mount animation IDs
if (cameraController->isJumpKeyPressed() && grounded && mountAction_ == MountAction::None) {
if (moving && mountAnims_.jumpLoop > 0) {
@ -1180,6 +1201,7 @@ void Renderer::updateCharacterAnimation() {
characterRenderer->playAnimation(mountInstanceId_, mountAnimId, loop);
}
taxi_mount_done:
// Rider bob: sinusoidal motion synced to mount's run animation (only used in fallback positioning)
mountBob = 0.0f;
if (moving && haveMountState && curMountDur > 1.0f) {