diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-07-04 10:53:32 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2025-07-04 10:53:32 +0200 |
| commit | e3f14fc0b375b4b7c2204a669d058ac124b78e92 (patch) | |
| tree | ad3bd4e6274f597a26a1fbb2cd3e3f5328913994 /move.go | |
| parent | 525dd3c3990ee8365e08be59a48df1f51a42b638 (diff) | |
Some pretty refactoring
Diffstat (limited to 'move.go')
| -rw-r--r-- | move.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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] |
