mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-16 12:40:38 +00:00
- Duke: Don't flash the weapon's ammo icon when flashing text for low ammo in RR FullscreenHUD1.
This commit is contained in:
parent
2cabc4b14d
commit
d8db31bdd8
1 changed files with 15 additions and 13 deletions
|
@ -139,24 +139,26 @@ public:
|
||||||
int weapon = p->curr_weapon;
|
int weapon = p->curr_weapon;
|
||||||
if (weapon == HANDREMOTE_WEAPON) weapon = DYNAMITE_WEAPON;
|
if (weapon == HANDREMOTE_WEAPON) weapon = DYNAMITE_WEAPON;
|
||||||
|
|
||||||
if (p->curr_weapon != KNEE_WEAPON && p->curr_weapon != SLINGBLADE_WEAPON && (!althud_flashing || (int)totalclock & 32 || p->ammo_amount[weapon] > (max_ammo_amount[weapon] / 10)))
|
|
||||||
{
|
|
||||||
format.Format("%d", p->ammo_amount[weapon]);
|
|
||||||
SBar_DrawString(this, &numberFont, format, -1, -numberFont.mFont->GetHeight() * scale + 4, DI_TEXT_ALIGN_RIGHT, CR_UNTRANSLATED, 1, 0, 0, scale, scale);
|
|
||||||
|
|
||||||
int wicon = ammo_sprites[p->curr_weapon];
|
int wicon = ammo_sprites[p->curr_weapon];
|
||||||
if (wicon > 0)
|
if (wicon > 0)
|
||||||
{
|
{
|
||||||
|
format.Format("%d", p->ammo_amount[weapon]);
|
||||||
auto imgWeap = tileGetTexture(wicon);
|
auto imgWeap = tileGetTexture(wicon);
|
||||||
auto weapScale = imgScale / imgWeap->GetDisplayHeight();
|
auto weapScale = imgScale / imgWeap->GetDisplayHeight();
|
||||||
auto imgX = 22.5;
|
auto imgX = 22.5;
|
||||||
auto strlen = format.Len();
|
auto strlen = format.Len();
|
||||||
|
|
||||||
if (strlen > 1)
|
if (strlen > 1)
|
||||||
{
|
{
|
||||||
imgX += (imgX * 0.755) * (strlen - 1);
|
imgX += (imgX * 0.755) * (strlen - 1);
|
||||||
}
|
}
|
||||||
DrawGraphic(imgWeap, -imgX, -2, DI_ITEM_RIGHT_BOTTOM, 1, -1, -1, weapScale, weapScale);
|
|
||||||
|
if (p->curr_weapon != KNEE_WEAPON && p->curr_weapon != SLINGBLADE_WEAPON && (!althud_flashing || (int)totalclock & 32 || p->ammo_amount[weapon] > (max_ammo_amount[weapon] / 10)))
|
||||||
|
{
|
||||||
|
SBar_DrawString(this, &numberFont, format, -1, -numberFont.mFont->GetHeight() * scale + 4, DI_TEXT_ALIGN_RIGHT, CR_UNTRANSLATED, 1, 0, 0, scale, scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DrawGraphic(imgWeap, -imgX, -2, DI_ITEM_RIGHT_BOTTOM, 1, -1, -1, weapScale, weapScale);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue