mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-03-01 00:41:16 +00:00
Fix in-game ticcmds being generated with your inputs while a menu is supposed to be eating them. (we can no longer rely on the ev_ system eating them before they get processed, so just add extra exceptions...
This commit is contained in:
parent
ff5992e3c4
commit
8b88284b32
1 changed files with 15 additions and 10 deletions
25
src/g_game.c
25
src/g_game.c
|
|
@ -870,6 +870,20 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
return;
|
||||
}
|
||||
|
||||
cmd->flags = 0;
|
||||
|
||||
if (menuactive || chat_on || CON_Ready())
|
||||
{
|
||||
cmd->flags |= TICCMD_TYPING;
|
||||
|
||||
if (hu_keystrokes)
|
||||
{
|
||||
cmd->flags |= TICCMD_KEYSTROKE;
|
||||
}
|
||||
|
||||
goto aftercmdinput;
|
||||
}
|
||||
|
||||
if (K_PlayerUsesBotMovement(player))
|
||||
{
|
||||
// Bot ticcmd is generated by K_BuildBotTiccmd
|
||||
|
|
@ -1017,17 +1031,8 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
*/
|
||||
|
||||
cmd->forwardmove += (SINT8)forward;
|
||||
cmd->flags = 0;
|
||||
|
||||
if (chat_on || CON_Ready())
|
||||
{
|
||||
cmd->flags |= TICCMD_TYPING;
|
||||
|
||||
if (hu_keystrokes)
|
||||
{
|
||||
cmd->flags |= TICCMD_KEYSTROKE;
|
||||
}
|
||||
}
|
||||
aftercmdinput:
|
||||
|
||||
/* Lua: Allow this hook to overwrite ticcmd.
|
||||
We check if we're actually in a level because for some reason this Hook would run in menus and on the titlescreen otherwise.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue