From 0bfe387ce4beb822913957d32a15e337619bfcd6 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 13 Jan 2013 20:08:01 +0900 Subject: [PATCH] Split up Sbar_Draw. The view visibility setting and drawing needs to be separated so the drawing happens every frame (for fps counter etc). --- nq/source/sbar.c | 9 +++++++-- qw/source/sbar.c | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/nq/source/sbar.c b/nq/source/sbar.c index e17c34780..339907876 100644 --- a/nq/source/sbar.c +++ b/nq/source/sbar.c @@ -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); } diff --git a/qw/source/sbar.c b/qw/source/sbar.c index 39ad57798..d333de415 100644 --- a/qw/source/sbar.c +++ b/qw/source/sbar.c @@ -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); }