mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-22 04:21:51 +00:00
Sbar stuff now reloads on gamedir change.
This /seems/ to be everything.
This commit is contained in:
parent
acf6c1d37d
commit
75a7c97c3a
1 changed files with 22 additions and 8 deletions
|
@ -1973,13 +1973,11 @@ Sbar_GIB_Print_Center_f (void)
|
|||
Sbar_CenterPrint (GIB_Argv(1));
|
||||
}
|
||||
|
||||
void
|
||||
Sbar_Init (void)
|
||||
static void
|
||||
sbar_load_pics (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
init_views ();
|
||||
|
||||
for (i = 0; i < 10; i++) {
|
||||
sb_nums[0][i] = Draw_PicFromWad (va ("num_%i", i));
|
||||
sb_nums[1][i] = Draw_PicFromWad (va ("anum_%i", i));
|
||||
|
@ -2054,6 +2052,26 @@ Sbar_Init (void)
|
|||
sb_face_invis_invuln = Draw_PicFromWad ("face_inv2");
|
||||
sb_face_quad = Draw_PicFromWad ("face_quad");
|
||||
|
||||
sb_sbar = Draw_PicFromWad ("sbar");
|
||||
sb_ibar = Draw_PicFromWad ("ibar");
|
||||
sb_scorebar = Draw_PicFromWad ("scorebar");
|
||||
}
|
||||
|
||||
static void
|
||||
sbar_gamedir (int phase)
|
||||
{
|
||||
if (!phase)
|
||||
return;
|
||||
sbar_load_pics ();
|
||||
}
|
||||
|
||||
void
|
||||
Sbar_Init (void)
|
||||
{
|
||||
QFS_GamedirCallback (sbar_gamedir);
|
||||
sbar_load_pics ();
|
||||
init_views ();
|
||||
|
||||
Cmd_AddCommand ("+showscores", Sbar_ShowScores,
|
||||
"Display information on everyone playing");
|
||||
Cmd_AddCommand ("-showscores", Sbar_DontShowScores,
|
||||
|
@ -2063,10 +2081,6 @@ Sbar_Init (void)
|
|||
Cmd_AddCommand ("-showteamscores", Sbar_DontShowTeamScores,
|
||||
"Stop displaying information for your team");
|
||||
|
||||
sb_sbar = Draw_PicFromWad ("sbar");
|
||||
sb_ibar = Draw_PicFromWad ("ibar");
|
||||
sb_scorebar = Draw_PicFromWad ("scorebar");
|
||||
|
||||
r_viewsize_callback = viewsize_f;
|
||||
|
||||
hud_scoreboard_uid = Cvar_Get ("hud_scoreboard_uid", "0", CVAR_NONE,
|
||||
|
|
Loading…
Reference in a new issue