mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-09-01 17:04:24 -04:00
Fixed compile error (#244)
This commit is contained in:
parent
b5db51800c
commit
87e016617a
@ -319,7 +319,7 @@ func (v *AnimatedEntity) getStepLength(tickTime float64) (float64, float64) {
|
||||
v.TargetX,
|
||||
v.TargetY,
|
||||
)
|
||||
radians := (math.Pi / 180.0) * angle
|
||||
radians := (math.Pi / 180.0) * float64(angle)
|
||||
oneStepX := length * math.Cos(radians)
|
||||
oneStepY := length * math.Sin(radians)
|
||||
return oneStepX, oneStepY
|
||||
@ -368,7 +368,7 @@ func (v *AnimatedEntity) SetTarget(tx, ty float64) {
|
||||
newAnimationMode = d2enum.AnimationModeMonsterWalk.String()
|
||||
}
|
||||
|
||||
newDirection := angleToDirection(angle, v.Cof.NumberOfDirections)
|
||||
newDirection := angleToDirection(float64(angle), v.Cof.NumberOfDirections)
|
||||
if newDirection != v.GetDirection() || newAnimationMode != v.animationMode {
|
||||
v.SetMode(newAnimationMode, v.weaponClass, newDirection)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user