Skip to content

Commit

Permalink
Fixed ammo status bar flickering
Browse files Browse the repository at this point in the history
Fixed a bug where when picking up a load of ammo, the yellow ammo numbers would flicker until the MUG turned or if you fired your weapon.
  • Loading branch information
Kippykip committed Jan 23, 2020
1 parent 7bdc475 commit 635d85e
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions source/st_stuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,6 @@ static void ST_doRefresh(void)

static boolean ST_NeedUpdate()
{
if(_g->w_ready.oldnum != *_g->w_ready.num)
return true;

if(_g->st_health.n.oldnum != *_g->st_health.n.num)
return true;

Expand All @@ -399,6 +396,15 @@ static boolean ST_NeedUpdate()

if(_g->w_faces.oldinum != *_g->w_faces.inum)
return true;

// ammo
for(int i=0; i<4; i++)
{
if(_g->w_ammo[i].oldnum != *_g->w_ammo[i].num)
return true;
if(_g->w_maxammo[i].oldnum != *_g->w_maxammo[i].num)
return true;
}

// weapons owned
for(int i=0; i<6; i++)
Expand Down

0 comments on commit 635d85e

Please # to comment.