fix(animation): re-probe capabilities on melee swing, add combat diagnostics

If the capability probe ran before the model was fully loaded, all melee
animation IDs would be 0 and auto-attack swings would silently fall back
to STAND (no visible animation). Now re-probes when a melee swing fires
but hasMelee is false.

Added WARNING-level logging to triggerMeleeSwing and CombatFSM to
diagnose the night elf stationary combat animation issue.
This commit is contained in:
Kelsi 2026-04-05 17:52:18 -07:00
parent 696baffdf7
commit 53639f9592
2 changed files with 28 additions and 4 deletions

View file

@ -1,6 +1,7 @@
#include "rendering/animation/combat_fsm.hpp"
#include "rendering/animation/animation_ids.hpp"
#include "game/inventory.hpp"
#include "core/logger.hpp"
namespace wowee {
namespace rendering {
@ -378,7 +379,10 @@ AnimOutput CombatFSM::resolve(const Input& in, const AnimCapabilitySet& caps,
animId = caps.resolvedMelee1H;
}
}
if (animId == 0) animId = anim::STAND; // Melee must play something
if (animId == 0) {
LOG_WARNING("CombatFSM: MELEE_SWING resolved animId=0, falling back to STAND");
animId = anim::STAND;
}
loop = false;
break;