mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-17 18:06:03 -05: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:
parent
6e31cfb52a
commit
2d4c79484f
@ -87,12 +87,13 @@ const (
|
||||
func (p *Player) Advance(tickTime float64) {
|
||||
p.Step(tickTime)
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
if p.IsCasting() {
|
||||
if p.composite.GetPlayedCount() >= 1 {
|
||||
p.isCasting = false
|
||||
}
|
||||
|
||||
// skills are casted after the first half of the casting animation is played
|
||||
|
Loading…
Reference in New Issue
Block a user