fix: outfit animation speed ignoring Animator when always animated (#1761)

Bug Fixes:
- Improved animation timing for creatures with attached animators.
- Ensured animator-driven phases are used when available, while preserving existing behavior for other creatures.
This commit is contained in:
Sherrat 2026-07-18 16:46:15 -03:00 committed by GitHub
parent 89e7898a78
commit 225ce4d5b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1205,6 +1205,10 @@ uint16_t Creature::getCurrentAnimationPhase(const bool mount)
}
if (thingType->isAnimateAlways()) {
if (const auto animator = thingType->getAnimator()) {
return static_cast<uint16_t>(thingType->getIdleAnimationPhases() + animator->getPhase());
}
const int animationPhases = thingType->getAnimationPhases();
if (animationPhases <= 0) return 0;