aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.go b/main.go
index 3d014bf..86dc59b 100644
--- a/main.go
+++ b/main.go
@@ -103,7 +103,9 @@ func (g *Game) updatePatrolling(cursor physics.Point) {
if inpututil.IsMouseButtonJustReleased(ebiten.MouseButtonRight) {
destination := cursor.Div(100).Mul(100)
for _, e := range g.Entities {
- Patrol(e, destination)
+ if e.Selection.IsEnabled && e.Selection.Value.IsSelected {
+ Patrol(e.Position, e.Move, &e.Order, destination)
+ }
}
g.CurrentAction = Selecting
}