From 0735888213d8575cf870f22d4d905af3f3c1ac9b Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Fri, 6 Oct 2023 07:08:27 +0200 Subject: fix(order): Start move of unselected units in order --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'main.go') diff --git a/main.go b/main.go index 2226190..f61c9c8 100644 --- a/main.go +++ b/main.go @@ -49,7 +49,9 @@ func (g *Game) updateSelecting(cursor Point, moveMap MoveMap) { destination := cursor.Div(100).Mul(100) slog.Info("destination", slog.String("destination", destination.String())) for _, e := range g.Entities { - e.StartMove(destination, moveMap) + if e.Selection.IsEnabled && e.Selection.Value.IsSelected { + e.StartMove(destination, moveMap) + } } } if inpututil.IsMouseButtonJustReleased(ebiten.MouseButtonLeft) { -- cgit v1.3