mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-23 03:52:12 -04:00
parent
adc76a8ea7
commit
26a5f22c01
@ -718,10 +718,11 @@ static void HU_widget_build_title (void)
|
|||||||
static void HU_widget_build_ammo (void)
|
static void HU_widget_build_ammo (void)
|
||||||
{
|
{
|
||||||
char hud_ammostr[HU_MAXLINELENGTH] = "AMM ";
|
char hud_ammostr[HU_MAXLINELENGTH] = "AMM ";
|
||||||
|
int fullammo = plr->maxammo[weaponinfo[plr->readyweapon].ammo];
|
||||||
int i = 4;
|
int i = 4;
|
||||||
|
|
||||||
// special case for weapon with no ammo selected - blank bargraph + N/A
|
// special case for weapon with no ammo selected - blank bargraph + N/A
|
||||||
if (weaponinfo[plr->readyweapon].ammo == am_noammo)
|
if (weaponinfo[plr->readyweapon].ammo == am_noammo || fullammo == 0)
|
||||||
{
|
{
|
||||||
if (hud_draw_bargraphs)
|
if (hud_draw_bargraphs)
|
||||||
{
|
{
|
||||||
@ -733,7 +734,6 @@ static void HU_widget_build_ammo (void)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
int ammo = plr->ammo[weaponinfo[plr->readyweapon].ammo];
|
int ammo = plr->ammo[weaponinfo[plr->readyweapon].ammo];
|
||||||
int fullammo = plr->maxammo[weaponinfo[plr->readyweapon].ammo];
|
|
||||||
int ammopct = (100 * ammo) / fullammo;
|
int ammopct = (100 * ammo) / fullammo;
|
||||||
int ammobars = ammopct / 4;
|
int ammobars = ammopct / 4;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user