Fix csqc not receiving +showscores console commands.

This commit is contained in:
Shpoike 2020-10-10 19:28:04 +01:00
parent 7aca9e0b87
commit e83edff77b
1 changed files with 16 additions and 0 deletions

View File

@ -73,6 +73,20 @@ void Sbar_MiniDeathmatchOverlay (void);
void Sbar_DeathmatchOverlay (void);
void M_DrawPic (int x, int y, qpic_t *pic);
qboolean Sbar_CSQCCommand(void)
{
qboolean ret = false;
if (cl.qcvm.extfuncs.CSQC_ConsoleCommand)
{
PR_SwitchQCVM(&cl.qcvm);
G_INT(OFS_PARM0) = PR_MakeTempString(Cmd_Argv(0));
PR_ExecuteProgram(cl.qcvm.extfuncs.CSQC_ConsoleCommand);
ret = G_FLOAT(OFS_RETURN);
PR_SwitchQCVM(NULL);
}
return ret;
}
/*
===============
Sbar_ShowScores
@ -82,6 +96,7 @@ Tab key down
*/
void Sbar_ShowScores (void)
{
Sbar_CSQCCommand();
if (sb_showscores)
return;
sb_showscores = true;
@ -97,6 +112,7 @@ Tab key up
*/
void Sbar_DontShowScores (void)
{
Sbar_CSQCCommand();
sb_showscores = false;
sb_updates = 0;
}