Merge pull request #24 from ScatterBox/main

This commit is contained in:
Ian 2023-01-23 19:30:04 -05:00 committed by GitHub
commit afe879cb4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 1 deletions

View file

@ -263,6 +263,7 @@ char *osk_text2 [] =
" Z X C V B N M < > ? "
};
extern qboolean console_enabled;
extern char *pr_strings;
void Key_Console (int key)
{
static char current[MAXCMDLINE] = "";
@ -351,6 +352,13 @@ void Key_Console (int key)
key_linepos = 1;
if (cls.state == ca_disconnected)
SCR_UpdateScreen (); // force an update, because the command may take some time
// for clientside cmds
if (cls.state == ca_connected)
{
pr_global_struct->CMD_STRING = (key_lines[edit_line-1]+1 - pr_strings);
PR_ExecuteProgram (pr_global_struct->ParseClientCommand);
}
return;
case K_TAB:
case K_LSHOULDER:

View file

@ -686,7 +686,8 @@ void M_Restart_Key (int key)
key_dest = key_game;
m_state = m_none;
paused_hack = false;
Cbuf_AddText ("restart\n");
//Cbuf_AddText ("restart\n");
PR_ExecuteProgram (pr_global_struct->Soft_Restart);
break;
default:
break;

View file

@ -56,6 +56,9 @@ typedef struct
func_t ClientDisconnect;
func_t SetNewParms;
func_t SetChangeParms;
func_t ParseClientCommand; // special command calls
string_t CMD_STRING;
func_t Soft_Restart;
} globalvars_t;
typedef struct