aboutsummaryrefslogtreecommitdiff
path: root/go/client
diff options
context:
space:
mode:
Diffstat (limited to 'go/client')
-rw-r--r--go/client/game.go15
1 files changed, 5 insertions, 10 deletions
diff --git a/go/client/game.go b/go/client/game.go
index 8447e452..32fb5f2f 100644
--- a/go/client/game.go
+++ b/go/client/game.go
@@ -409,18 +409,12 @@ func (g *Game) highlightTargets() {
func (g *Game) Update() error {
g.handlePlayerNotifications()
-
- if err := g.Collection.Update(); err != nil {
- return nil
- }
-
- x, y := ebiten.CursorPosition()
-
- obj := g.findObjectAt(x, y)
-
g.highlightTargets()
if inpututil.IsMouseButtonJustPressed(ebiten.MouseButtonLeft) {
+ x, y := ebiten.CursorPosition()
+ obj := g.findObjectAt(x, y)
+
if g.prompt != nil {
if err := g.prompt.Add(obj); err == nil {
g.AddHighlight(obj)
@@ -445,7 +439,8 @@ func (g *Game) Update() error {
g.prompt.ClearSelections()
}
}
- return nil
+
+ return g.Collection.Update()
}
func (g *Game) Draw(screen *ebiten.Image) {