diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2023-10-06 07:08:27 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2023-10-06 07:08:27 +0200 |
| commit | 0735888213d8575cf870f22d4d905af3f3c1ac9b (patch) | |
| tree | 7c05f337e6db6dbff43cda22346482d7263b1e3e /main.go | |
| parent | bf546b1b4c92d3d358a85b6b760dad01bc95ea7c (diff) | |
fix(order): Start move of unselected units in order
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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) { |
