From e96be3b817f2c8a1ca5b2d0b83dd7831e37b79bd Mon Sep 17 00:00:00 2001 From: Spoike Date: Wed, 15 Jan 2014 02:51:01 +0000 Subject: [PATCH] and fix the hud. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4584 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/sbar.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/engine/client/sbar.c b/engine/client/sbar.c index 8c26716e5..f4e07e296 100644 --- a/engine/client/sbar.c +++ b/engine/client/sbar.c @@ -781,18 +781,20 @@ Sbar_Init =============== */ -qboolean sbar_loaded; +static qboolean sbar_loaded; -char *failedpic; +static qboolean failedpic; mpic_t *Sbar_PicFromWad(char *name) { mpic_t *ret; - ret = R2D_SafePicFromWad(name); + char savedname[MAX_QPATH]; + Q_strncpyz(savedname, name, sizeof(savedname)); + ret = R2D_SafePicFromWad(savedname); if (ret) return ret; - failedpic = name; + failedpic = true; return NULL; } void Sbar_Flush (void) @@ -812,7 +814,7 @@ void Sbar_Start (void) //if one of these fails, skip the entire status bar. sbarfailed = true; return; } - failedpic = NULL; + failedpic = false; sbarfailed = false; @@ -901,12 +903,8 @@ void Sbar_Start (void) //if one of these fails, skip the entire status bar. if (failedpic) sbarfailed = true; - failedpic = NULL; - - - //try to detect rogue wads, and thus the stats we will be getting from the server. - failedpic = NULL; + failedpic = false; rsb_invbar[0] = Sbar_PicFromWad ("r_invbar1"); rsb_invbar[1] = Sbar_PicFromWad ("r_invbar2");