aboutsummaryrefslogtreecommitdiff
path: root/order.go
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2025-07-24 14:24:09 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2025-07-24 14:25:12 +0200
commit2c8bbab70c690cdbb6201b79f3180b8552b53ae1 (patch)
tree5a89d7c7334d3de2e7b41d95349af739a917d29f /order.go
parent9f30f800443e6496bbba264a375c126cb26b1760 (diff)
fix: main move cancels orders
Diffstat (limited to 'order.go')
-rw-r--r--order.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/order.go b/order.go
index eba71f9..d6f1ccb 100644
--- a/order.go
+++ b/order.go
@@ -23,6 +23,9 @@ func (e *Entity) MainAction(g *Game, destination physics.Point, entityAtDestinat
return
}
if e.Move.IsEnabled {
+ if e.Order.IsEnabled {
+ e.Order.Value = nil
+ }
physics.StartMove(&e.Move, e.Position, destination, moveMap)
return
}