1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-09-29 22:56:07 -04:00

Animation mode for player should be checked (and possible changed) every tick. It needs to be changed when the player stops or starts running while follwing a path (single click, don't hold the mouse at target). Fixes #837 (#875)

This commit is contained in:
Thomas Christlieb 2020-10-28 20:11:41 +01:00 committed by GitHub
parent 6e31cfb52a
commit 2d4c79484f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,12 +87,13 @@ const (
func (p *Player) Advance(tickTime float64) {
p.Step(tickTime)
if err := p.SetAnimationMode(p.GetAnimationMode()); err != nil {
fmt.Printf("failed to set animationMode to: %d, err: %v\n", p.GetAnimationMode(), err)
}
if p.IsCasting() {
if p.composite.GetPlayedCount() >= 1 {
p.isCasting = false
if err := p.SetAnimationMode(p.GetAnimationMode()); err != nil {
fmt.Printf("failed to set animationMode to: %d, err: %v\n", p.GetAnimationMode(), err)
}
}
// skills are casted after the first half of the casting animation is played