mirror of
https://github.com/nzp-team/fteqw.git
synced 2025-03-21 07:31:08 +00:00
respect return value with hud plugin call, disable scoreboard in hud plugin
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2376 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
5d58e5ce6e
commit
0939c0e46c
2 changed files with 10 additions and 8 deletions
|
@ -1532,9 +1532,10 @@ void Plug_SBar(void)
|
|||
extern qboolean sb_showscores, sb_showteamscores;
|
||||
|
||||
plugin_t *oc=currentplug;
|
||||
int cp;
|
||||
int cp, ret;
|
||||
vrect_t rect;
|
||||
|
||||
ret = 0;
|
||||
if (!plug_sbar.value)
|
||||
currentplug = NULL;
|
||||
else
|
||||
|
@ -1548,13 +1549,13 @@ void Plug_SBar(void)
|
|||
SCR_VRectForPlayer(&rect, cp);
|
||||
if (Draw_ImageColours)
|
||||
Draw_ImageColours(1, 1, 1, 1); // ensure menu colors are reset
|
||||
VM_Call(currentplug->vm, currentplug->sbarlevel[0], cp, rect.x, rect.y, rect.width, rect.height, sb_showscores+sb_showteamscores*2);
|
||||
ret |= VM_Call(currentplug->vm, currentplug->sbarlevel[0], cp, rect.x, rect.y, rect.width, rect.height, sb_showscores+sb_showteamscores*2);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!currentplug)
|
||||
if (!ret)
|
||||
{
|
||||
Sbar_Draw();
|
||||
currentplug = oc;
|
||||
|
|
|
@ -1265,13 +1265,13 @@ int UI_StatusBarEdit(int *arg) // seperated so further improvements to editor vi
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
int UI_ScoreBoard(int *arg)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!arg[5])
|
||||
return 0;
|
||||
return false;
|
||||
|
||||
sbarminx = 320;
|
||||
sbarminy = 48;
|
||||
|
@ -1289,8 +1289,9 @@ int UI_ScoreBoard(int *arg)
|
|||
sbarminy += 16;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
|
||||
#define HUD_VERSION 52345
|
||||
void PutFloat(float f, char sep, qhandle_t handle)
|
||||
|
@ -2042,7 +2043,7 @@ int Plug_Init(int *args)
|
|||
{
|
||||
if (Plug_Export("Tick", Plug_Tick) &&
|
||||
Plug_Export("SbarBase", UI_StatusBar) &&
|
||||
Plug_Export("SbarOverlay", UI_ScoreBoard) &&
|
||||
// Plug_Export("SbarOverlay", UI_ScoreBoard) &&
|
||||
Plug_Export("ExecuteCommand", Plug_ExecuteCommand) &&
|
||||
Plug_Export("MenuEvent", Plug_MenuEvent))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue