summaryrefslogtreecommitdiff
path: root/apps/plugins/doom/g_game.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/doom/g_game.c')
-rw-r--r--apps/plugins/doom/g_game.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/plugins/doom/g_game.c b/apps/plugins/doom/g_game.c
index e41c84c378..99f8e63187 100644
--- a/apps/plugins/doom/g_game.c
+++ b/apps/plugins/doom/g_game.c
@@ -229,6 +229,9 @@ static unsigned int dclicktime2;
229static unsigned int dclickstate2; 229static unsigned int dclickstate2;
230static unsigned int dclicks2; 230static unsigned int dclicks2;
231 231
232// scrollwheel values
233static int scrollmag;
234
232// joystick values are repeated 235// joystick values are repeated
233static int joyxmove; 236static int joyxmove;
234static int joyymove; 237static int joyymove;
@@ -317,6 +320,13 @@ void G_BuildTiccmd(ticcmd_t* cmd)
317 320
318 // let movement keys cancel each other out 321 // let movement keys cancel each other out
319 322
323 /* strafe with scrollwheel */
324 if (scrollmag > 0)
325 side += 5*sidemove[speed];
326 if (scrollmag < 0)
327 side -= 5*sidemove[speed];
328 scrollmag = 0;
329
320 if (strafe) 330 if (strafe)
321 { 331 {
322 if (gamekeydown[key_right]) 332 if (gamekeydown[key_right])
@@ -757,6 +767,9 @@ boolean G_Responder (event_t* ev)
757 joyymove = ev->data3; 767 joyymove = ev->data3;
758 return true; // eat events 768 return true; // eat events
759 769
770 case ev_scroll:
771 scrollmag = ev->data1;
772
760 default: 773 default:
761 break; 774 break;
762 } 775 }