diff --git a/src/st_lib.c b/src/st_lib.c index 35aef2ff..e53481ce 100644 --- a/src/st_lib.c +++ b/src/st_lib.c @@ -112,7 +112,7 @@ static void STlib_drawNum } // if non-number, do not draw it - if (num == 1994) + if (num == LARGENUMBER) return; //jff 2/16/98 add color translation to digit output diff --git a/src/st_lib.h b/src/st_lib.h index 0816314e..3dd4dfee 100644 --- a/src/st_lib.h +++ b/src/st_lib.h @@ -22,6 +22,8 @@ #include "doomtype.h" +#define LARGENUMBER 1994 + // We are referring to patches. struct patch_s; diff --git a/src/st_stuff.c b/src/st_stuff.c index 7e82d7e2..b0cb85ae 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -730,9 +730,10 @@ int ST_BlinkKey(player_t* player, int index) return -1; } +static int largeammo = LARGENUMBER; // means "n/a" + void ST_updateWidgets(void) { - static int largeammo = 1994; // means "n/a" int i; // must redirect the pointer if the ready weapon has changed. @@ -1221,6 +1222,9 @@ void ST_createWidgets(void) // the last weapon type w_ready.data = plyr->readyweapon; + if (weaponinfo[plyr->readyweapon].ammo == am_noammo) + w_ready.num = &largeammo; + // health percentage STlib_initPercent(&w_health, ST_HEALTHX - distributed_delta, diff --git a/src/wi_stuff.c b/src/wi_stuff.c index 1a9ac7a5..53c6a96f 100644 --- a/src/wi_stuff.c +++ b/src/wi_stuff.c @@ -34,6 +34,7 @@ #include "mn_menu.h" #include "r_defs.h" #include "s_sound.h" +#include "st_lib.h" #include "sounds.h" #include "u_mapinfo.h" #include "v_video.h" @@ -767,7 +768,7 @@ WI_drawNum } // if non-number, do not draw it - if (n == 1994) + if (n == LARGENUMBER) return 0; // draw the new number