2
0
mirror of https://github.com/FWGS/hlsdk-xash3d synced 2024-11-21 17:36:18 +01:00

client: ammo: increase ammobar size depending on sprites size (extra change, not fixed in HL25 yet)

See ValveSoftware/halflife#3728 comment
This commit is contained in:
Alibek Omarov 2023-12-22 10:06:52 +03:00 committed by Andrey Akhmichin
parent 6a9c596dd3
commit ee304c94b6

View File

@ -325,16 +325,19 @@ int CHudAmmo::VidInit( void )
// If we've already loaded weapons, let's get new sprites
gWR.LoadAllWeaponSprites();
if( ScreenWidth >= 640 )
{
giABWidth = 20;
giABHeight = 4;
}
const int res = GetSpriteRes( ScreenWidth, ScreenHeight );
int factor;
if( res >= 2560 )
factor = 4;
else if( res >= 1280 )
factor = 3;
else if( res >= 640 )
factor = 2;
else
{
giABWidth = 10;
giABHeight = 2;
}
factor = 1;
giABWidth = 10 * factor;
giABHeight = 2 * factor;
return 1;
}