mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-19 02:46:35 -05:00
parent
297184376f
commit
4254b0f020
@ -2,7 +2,6 @@ package d2scene
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"image/color"
|
"image/color"
|
||||||
"log"
|
|
||||||
|
|
||||||
"github.com/OpenDiablo2/D2Shared/d2helper"
|
"github.com/OpenDiablo2/D2Shared/d2helper"
|
||||||
|
|
||||||
@ -113,7 +112,6 @@ func (v *Game) Update(tickTime float64) {
|
|||||||
newDirection := d2render.DirectionLookup[directionIndex]
|
newDirection := d2render.DirectionLookup[directionIndex]
|
||||||
if newDirection != v.mapEngine.Hero.AnimatedEntity.GetDirection() {
|
if newDirection != v.mapEngine.Hero.AnimatedEntity.GetDirection() {
|
||||||
v.mapEngine.Hero.AnimatedEntity.SetMode(d2enum.AnimationModePlayerTownNeutral.String(), v.mapEngine.Hero.Equipment.RightHand.GetWeaponClass(), newDirection)
|
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
|
// 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 {
|
func (v AnimatedEntity) GetDirection() int {
|
||||||
return v.direction
|
return v.direction
|
||||||
|
Loading…
Reference in New Issue
Block a user