Fix grenade icon alignment for enabled oldfashionedgunstats

Now, if oldfashionedgunstats is enabled, then ammo stats > 99 won't collide
with grenade icon on modern monitors with aspect ratio > 1.5 . It will
collide still on older monitors, because of lack of the free space on HUD.
This commit is contained in:
aurhat
2021-02-14 19:46:14 +01:00
committed by drian
parent 4a064da5b5
commit db18caba16
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -333,6 +333,7 @@ void drawequipicons(playerent *p)
// health & armor
if(p->armour) drawequipicon(HUDPOS_ARMOUR*2, 1650, (p->armour-1)/25, 2);
if(p->mag[GUN_GRENADE]) drawequipicon(oldfashionedgunstats ? (HUDPOS_GRENADE + (((float)screen->w / (float)screen->h > 1.5f) ? 75 : 25)) * 2 : HUDPOS_GRENADE*2, 1650, 3, 1);
drawequipicon(HUDPOS_HEALTH*2, 1650, 2, 3);
if(p->mag[GUN_GRENADE]) drawequipicon(oldfashionedgunstats ? (HUDPOS_GRENADE + 25)*2 : HUDPOS_GRENADE*2, 1650, 3, 1);