Split up Sbar_Draw.

The view visibility setting and drawing needs to be separated so the
drawing happens every frame (for fps counter etc).
This commit is contained in:
Bill Currie 2013-01-13 20:08:01 +09:00
parent a8542c2d48
commit 0bfe387ce4
2 changed files with 14 additions and 4 deletions

View file

@ -985,8 +985,8 @@ draw_hipnotic_status (view_t *view)
draw_pic (view, 209, 12, sb_items[1]);
}
void
Sbar_Draw (void)
static void
sbar_update_vis (void)
{
qboolean headsup;
@ -1017,7 +1017,12 @@ Sbar_Draw (void)
r_data->scr_copyeverything = 1;
sb_updates++;
}
void
Sbar_Draw (void)
{
sbar_update_vis ();
main_view->draw (main_view);
}

View file

@ -908,8 +908,8 @@ draw_overlay (view_t *view)
Sbar_TeamOverlay (view);
}
void
Sbar_Draw (void)
static void
sbar_update_vis (void)
{
qboolean headsup;
@ -944,7 +944,12 @@ Sbar_Draw (void)
if (sb_showscores || sb_showteamscores || cl.stats[STAT_HEALTH] <= 0)
sb_updates = 0;
}
void
Sbar_Draw (void)
{
sbar_update_vis ();
main_view->draw (main_view);
}