Skip to content

Commit

Permalink
Account for the SSG when displaying the ARMS widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
viciious committed Dec 23, 2023
1 parent 29d0eea commit b8a57a1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions st_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,14 +360,17 @@ static void ST_Ticker_(stbar_t* sb)
/* */
for (ind = 0; ind < NUMMICROS; ind++)
{
if (p->weaponowned[ind + 1] != sb->weaponowned[ind] || sb->forcedraw)
int weaponowned = ind + 1 == wp_shotgun ?
(p->weaponowned[wp_shotgun] || p->weaponowned[wp_supershotgun]) :
(ind + 1 < wp_shotgun ? p->weaponowned[ind + 1] : p->weaponowned[ind + 2]);

if (weaponowned != sb->weaponowned[ind] || sb->forcedraw)
{
cmd = &sb->stbarcmds[sb->numstbarcmds++];
cmd->id = stc_drawmicro;
cmd->ind = ind;
cmd->value = p->weaponowned[ind + 1];

sb->weaponowned[ind] = p->weaponowned[ind + 1];
cmd->value = weaponowned;
sb->weaponowned[ind] = weaponowned;
}
}

Expand Down

0 comments on commit b8a57a1

Please sign in to comment.