mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-10-01 15:46:17 -04:00
parent
297184376f
commit
4254b0f020
@ -2,7 +2,6 @@ package d2scene
|
||||
|
||||
import (
|
||||
"image/color"
|
||||
"log"
|
||||
|
||||
"github.com/OpenDiablo2/D2Shared/d2helper"
|
||||
|
||||
@ -113,7 +112,6 @@ func (v *Game) Update(tickTime float64) {
|
||||
newDirection := d2render.DirectionLookup[directionIndex]
|
||||
if newDirection != v.mapEngine.Hero.AnimatedEntity.GetDirection() {
|
||||
v.mapEngine.Hero.AnimatedEntity.SetMode(d2enum.AnimationModePlayerTownNeutral.String(), v.mapEngine.Hero.Equipment.RightHand.GetWeaponClass(), newDirection)
|
||||
log.Printf("Angle: %d -> %d", directionIndex, newDirection)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ func CreateAnimatedEntity(x, y int32, object *d2datadict.ObjectLookupRecord, fil
|
||||
}
|
||||
|
||||
// DirectionLookup is used to decode the direction offset indexes
|
||||
var DirectionLookup = []int{9, 15, 5, 6, 4, 10, 2, 8, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
var DirectionLookup = []int{9, 15, 5, 6, 4, 12, 10, 2, 8, 13, 1, 7, 0, 14, 11, 3}
|
||||
|
||||
func (v AnimatedEntity) GetDirection() int {
|
||||
return v.direction
|
||||
|
Loading…
Reference in New Issue
Block a user