aboutsummaryrefslogtreecommitdiff
path: root/move.go
diff options
context:
space:
mode:
Diffstat (limited to 'move.go')
-rw-r--r--move.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/move.go b/move.go
index da73c27..1322a51 100644
--- a/move.go
+++ b/move.go
@@ -173,11 +173,12 @@ func (e *Entity) moveToward(destination Point) {
}
func (e *Entity) UpdateMove(moveMap MoveMap) {
- if !e.Move.IsEnabled || !e.Position.IsEnabled {
+ if !e.Move.IsEnabled || !e.Position.IsEnabled || !e.Move.Value.IsActive {
return
}
position := e.Position.Value
- if !e.Move.Value.IsActive {
+ if len(e.Move.Value.Path) == 0 {
+ e.Move.Value.IsActive = false
return
}
next := e.Move.Value.Path[0]