aboutsummaryrefslogtreecommitdiff
path: root/game
diff options
context:
space:
mode:
author Gone2Daly <71726742+Gone2Daly@users.noreply.github.com>2023-04-11 12:41:35 +0200
committer Gone2Daly <71726742+Gone2Daly@users.noreply.github.com>2023-04-11 12:41:35 +0200
commit369880cb44a98853615326255d6e7e4356166b3b (patch)
tree2972153b188eca8a3a8d2c88357579b9a0169e90 /game
parent5f09e4720581994ca88446add32d8b6189428b13 (diff)
Returned movement of camera when it's clicked and mouse have movement
Vital RTS feature, vital for multiplayer micro as well.
Diffstat (limited to 'game')
-rw-r--r--game/src/GameSession/Minimap.gd2
1 files changed, 1 insertions, 1 deletions
diff --git a/game/src/GameSession/Minimap.gd b/game/src/GameSession/Minimap.gd
index 5d15ce8..7c02698 100644
--- a/game/src/GameSession/Minimap.gd
+++ b/game/src/GameSession/Minimap.gd
@@ -11,7 +11,7 @@ func _draw() -> void:
draw_multiline(_viewport_points, Color.WHITE, -1)
func _unhandled_input(event : InputEvent):
- if event.is_action_pressed(_action_click):
+ if event is InputEventMouseMotion and Input.is_action_pressed(_action_click):
var pos_clicked := get_local_mouse_position() / size - Vector2(0.5, 0.5)
if abs(pos_clicked.x) < 0.5 and abs(pos_clicked.y) < 0.5:
minimap_clicked.emit(pos_clicked)