mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-22 03:12:00 -04:00
Clear input on menu open/close (#1462)
This commit is contained in:
parent
f3439f70e2
commit
9c21ed7669
17
src/g_game.c
17
src/g_game.c
@ -841,6 +841,16 @@ void G_BuildTiccmd(ticcmd_t* cmd)
|
||||
}
|
||||
}
|
||||
|
||||
void G_ClearInput(void)
|
||||
{
|
||||
I_ResetControllerLevel();
|
||||
mousex = mousey = 0;
|
||||
memset(&localview, 0, sizeof(localview));
|
||||
memset(&carry, 0, sizeof(carry));
|
||||
memset(&prevcarry, 0, sizeof(prevcarry));
|
||||
memset(&basecmd, 0, sizeof(basecmd));
|
||||
}
|
||||
|
||||
//
|
||||
// G_DoLoadLevel
|
||||
//
|
||||
@ -947,12 +957,7 @@ static void G_DoLoadLevel(void)
|
||||
|
||||
// clear cmd building stuff
|
||||
memset (gamekeydown, 0, sizeof(gamekeydown));
|
||||
I_ResetControllerLevel();
|
||||
mousex = mousey = 0;
|
||||
memset(&localview, 0, sizeof(localview));
|
||||
memset(&carry, 0, sizeof(carry));
|
||||
memset(&prevcarry, 0, sizeof(prevcarry));
|
||||
memset(&basecmd, 0, sizeof(basecmd));
|
||||
G_ClearInput();
|
||||
sendpause = sendsave = paused = false;
|
||||
// [FG] array size!
|
||||
memset (mousearray, 0, sizeof(mousearray));
|
||||
|
@ -32,6 +32,7 @@
|
||||
#define MBF21_GAME_OPTION_SIZE (21 + MBF21_COMP_TOTAL)
|
||||
|
||||
void G_PrepTiccmd(void);
|
||||
void G_ClearInput(void);
|
||||
boolean G_MovementResponder(event_t *ev);
|
||||
boolean G_Responder(event_t *ev);
|
||||
boolean G_CheckDemoStatus(void);
|
||||
|
@ -6602,6 +6602,8 @@ void M_StartControlPanel (void)
|
||||
currentMenu = &MainDef; // JDC
|
||||
itemOn = currentMenu->lastOn; // JDC
|
||||
print_warning_about_changes = false; // killough 11/98
|
||||
|
||||
G_ClearInput();
|
||||
}
|
||||
|
||||
//
|
||||
@ -6765,6 +6767,8 @@ static void M_ClearMenus(void)
|
||||
|
||||
// if (!netgame && usergame && paused)
|
||||
// sendpause = true;
|
||||
|
||||
G_ClearInput();
|
||||
}
|
||||
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user