mirror of
https://github.com/mehah/otclient
synced 2026-08-15 16:29:06 -04:00
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:
parent
89e7898a78
commit
225ce4d5b5
1 changed files with 4 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue