mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-09 01:01:07 +00:00
Fix csqc not receiving +showscores console commands.
This commit is contained in:
parent
7aca9e0b87
commit
e83edff77b
1 changed files with 16 additions and 0 deletions
16
Quake/sbar.c
16
Quake/sbar.c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue