1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-11-19 02:46:35 -05:00

Idle animation and hover gets out of sync (#161)

This commit is contained in:
TehGoat 2019-11-13 18:56:54 +01:00 committed by Tim Sarbin
parent 358fa1481c
commit 055fcd72ed

View File

@ -563,9 +563,13 @@ func (v *SelectHeroClass) updateHeroSelectionHover(hero d2enum.Hero, canSelect b
return
}
if mouseHover {
if mouseHover && renderInfo.Stance != d2enum.HeroStanceIdleSelected {
renderInfo.IdleSelectedSprite.LastFrameTime = renderInfo.IdleSprite.LastFrameTime
renderInfo.IdleSelectedSprite.Frame = renderInfo.IdleSprite.Frame
renderInfo.Stance = d2enum.HeroStanceIdleSelected
} else {
} else if !mouseHover && renderInfo.Stance != d2enum.HeroStanceIdle {
renderInfo.IdleSprite.LastFrameTime = renderInfo.IdleSelectedSprite.LastFrameTime
renderInfo.IdleSprite.Frame = renderInfo.IdleSelectedSprite.Frame
renderInfo.Stance = d2enum.HeroStanceIdle
}