2
0
mirror of https://github.com/FWGS/hlsdk-xash3d synced 2024-11-21 09:26:14 +01:00

client: ammohistory: properly reset gHR.iHistoryGap in VidInit

This fixes unneeded gaps in ammohistory, after the change of HUD spritesheet
resolution from bigger to smaller
This commit is contained in:
Alibek Omarov 2023-12-21 04:08:44 +03:00 committed by Andrey Akhmichin
parent 5ca6684096
commit c299495477

View File

@ -323,7 +323,7 @@ int CHudAmmo::VidInit( void )
giBucketWidth = gHUD.GetSpriteRect( m_HUD_bucket0 ).right - gHUD.GetSpriteRect( m_HUD_bucket0 ).left;
giBucketHeight = gHUD.GetSpriteRect( m_HUD_bucket0 ).bottom - gHUD.GetSpriteRect( m_HUD_bucket0 ).top;
gHR.iHistoryGap = Q_max( gHR.iHistoryGap, gHUD.GetSpriteRect( m_HUD_bucket0 ).bottom - gHUD.GetSpriteRect( m_HUD_bucket0 ).top );
gHR.iHistoryGap = gHUD.GetSpriteRect( m_HUD_bucket0 ).bottom - gHUD.GetSpriteRect( m_HUD_bucket0 ).top;
// If we've already loaded weapons, let's get new sprites
gWR.LoadAllWeaponSprites();