From: terencehill Date: Tue, 29 Dec 2020 16:36:23 +0000 (+0100) Subject: Minigames: fix mouse buttons acting on the current keyboard selection (if changed... X-Git-Tag: xonotic-v0.8.5~597^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4007372efa4f5a012028d366bca3ba3ff6199d34;p=xonotic%2Fxonotic-data.pk3dir.git Minigames: fix mouse buttons acting on the current keyboard selection (if changed) instead of the current mouse position --- diff --git a/qcsrc/common/minigames/minigame/bd.qc b/qcsrc/common/minigames/minigame/bd.qc index 0744c0b37..4ae1f0126 100644 --- a/qcsrc/common/minigames/minigame/bd.qc +++ b/qcsrc/common/minigames/minigame/bd.qc @@ -1350,12 +1350,14 @@ int bd_client_event(entity minigame, string event, ...) { if(...(0,int) == K_MOUSE1) { + bd_client_event(minigame, "mouse_moved"); bd_editor_make_move(minigame, ""); return true; } if(...(0,int) == K_MOUSE2) { + bd_client_event(minigame, "mouse_moved"); bd_editor_fill(minigame); return true; } diff --git a/qcsrc/common/minigames/minigame/c4.qc b/qcsrc/common/minigames/minigame/c4.qc index 665f72f9c..01adebea9 100644 --- a/qcsrc/common/minigames/minigame/c4.qc +++ b/qcsrc/common/minigames/minigame/c4.qc @@ -487,6 +487,7 @@ int c4_client_event(entity minigame, string event, ...) { if(...(0,int) == K_MOUSE1) { + c4_client_event(minigame, "mouse_moved"); c4_make_move(minigame); return true; } diff --git a/qcsrc/common/minigames/minigame/nmm.qc b/qcsrc/common/minigames/minigame/nmm.qc index 18ed02009..ab35deaf9 100644 --- a/qcsrc/common/minigames/minigame/nmm.qc +++ b/qcsrc/common/minigames/minigame/nmm.qc @@ -721,6 +721,7 @@ int nmm_client_event(entity minigame, string event, ...) } else if ( event == "mouse_pressed" && ...(0,int) == K_MOUSE1 ) { + nmm_client_event(minigame, "mouse_moved"); nmm_make_move(minigame); return 1; } diff --git a/qcsrc/common/minigames/minigame/pp.qc b/qcsrc/common/minigames/minigame/pp.qc index 7204ddf8d..4a445fa45 100644 --- a/qcsrc/common/minigames/minigame/pp.qc +++ b/qcsrc/common/minigames/minigame/pp.qc @@ -555,6 +555,7 @@ int pp_client_event(entity minigame, string event, ...) { if(...(0,int) == K_MOUSE1) { + pp_client_event(minigame, "mouse_moved"); pp_make_move(minigame); return true; } diff --git a/qcsrc/common/minigames/minigame/ps.qc b/qcsrc/common/minigames/minigame/ps.qc index b60a6a7fc..c976819dc 100644 --- a/qcsrc/common/minigames/minigame/ps.qc +++ b/qcsrc/common/minigames/minigame/ps.qc @@ -600,6 +600,7 @@ int ps_client_event(entity minigame, string event, ...) { if(...(0,int) == K_MOUSE1) { + ps_client_event(minigame, "mouse_moved"); ps_make_move(minigame); return true; } diff --git a/qcsrc/common/minigames/minigame/ttt.qc b/qcsrc/common/minigames/minigame/ttt.qc index d578aa961..530243dc3 100644 --- a/qcsrc/common/minigames/minigame/ttt.qc +++ b/qcsrc/common/minigames/minigame/ttt.qc @@ -625,6 +625,7 @@ int ttt_client_event(entity minigame, string event, ...) { if(...(0,int) == K_MOUSE1) { + ttt_client_event(minigame, "mouse_moved"); ttt_make_move(minigame); return true; }