]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Minigames: fix mouse buttons acting on the current keyboard selection (if changed...
authorterencehill <piuntn@gmail.com>
Tue, 29 Dec 2020 16:36:23 +0000 (17:36 +0100)
committerterencehill <piuntn@gmail.com>
Tue, 29 Dec 2020 16:36:23 +0000 (17:36 +0100)
qcsrc/common/minigames/minigame/bd.qc
qcsrc/common/minigames/minigame/c4.qc
qcsrc/common/minigames/minigame/nmm.qc
qcsrc/common/minigames/minigame/pp.qc
qcsrc/common/minigames/minigame/ps.qc
qcsrc/common/minigames/minigame/ttt.qc

index 0744c0b379cbe8d0a483b47c10976af51aefebb8..4ae1f0126807c3817724fd23da61340e0e860524 100644 (file)
@@ -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;
                                }
index 665f72f9c39ffaef4e18d71be9c69357f923a7b7..01adebea9f2a4509ec3c0d30ac38c9e4aaf3900f 100644 (file)
@@ -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;
                        }
index 18ed02009b8c95a6dfa516f0f7f2a3d7b30c3e21..ab35deaf9656fa35842c4ca53acd1182df2cb16f 100644 (file)
@@ -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;
        }
index 7204ddf8df0a06ce60dd5dcdae946e053cb65bce..4a445fa45c3a356f93d54e1367f84f1facd279cd 100644 (file)
@@ -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;
                        }
index b60a6a7fc0bfcdf6ad9970a5d2e1398ac2f425e1..c976819dc4dfe2afff2f4baf0cce03cb1ada5570 100644 (file)
@@ -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;
                        }
index d578aa9615ae8b53b95b8fd7f6b88ca9c2c5fc17..530243dc3a870f1bc58e6255320813ca71b85a9e 100644 (file)
@@ -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;
                        }