mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-02-08 21:14:14 +00: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:
parent
e8db2fa354
commit
e3f44e2225
@ -325,16 +325,19 @@ int CHudAmmo::VidInit( void )
|
|||||||
// If we've already loaded weapons, let's get new sprites
|
// If we've already loaded weapons, let's get new sprites
|
||||||
gWR.LoadAllWeaponSprites();
|
gWR.LoadAllWeaponSprites();
|
||||||
|
|
||||||
if( ScreenWidth >= 640 )
|
const int res = GetSpriteRes( ScreenWidth, ScreenHeight );
|
||||||
{
|
int factor;
|
||||||
giABWidth = 20;
|
if( res >= 2560 )
|
||||||
giABHeight = 4;
|
factor = 4;
|
||||||
}
|
else if( res >= 1280 )
|
||||||
|
factor = 3;
|
||||||
|
else if( res >= 640 )
|
||||||
|
factor = 2;
|
||||||
else
|
else
|
||||||
{
|
factor = 1;
|
||||||
giABWidth = 10;
|
|
||||||
giABHeight = 2;
|
giABWidth = 10 * factor;
|
||||||
}
|
giABHeight = 2 * factor;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user