resetting rem doesn't seem to hurt

This commit is contained in:
Josh Deprez 2021-09-04 16:14:50 +10:00
parent a4a5be2d37
commit f5f0c447aa

View file

@ -46,6 +46,7 @@ func (a *Actor) MoveX(x float64, onCollide func()) {
if onCollide != nil { if onCollide != nil {
onCollide() onCollide()
} }
a.xRem = 0
return return
} }
a.Pos.X += sign a.Pos.X += sign
@ -66,6 +67,7 @@ func (a *Actor) MoveY(y float64, onCollide func()) {
if onCollide != nil { if onCollide != nil {
onCollide() onCollide()
} }
a.yRem = 0
return return
} }
a.Pos.Y += sign a.Pos.Y += sign
@ -86,6 +88,7 @@ func (a *Actor) MoveZ(z float64, onCollide func()) {
if onCollide != nil { if onCollide != nil {
onCollide() onCollide()
} }
a.zRem = 0
return return
} }
a.Pos.Z += sign a.Pos.Z += sign