mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-24 05:34:18 +00:00
Fix crosshair.
This commit is contained in:
parent
946e962f3c
commit
a2e4a7ec03
@ -305,6 +305,9 @@ void CHudAmmo::Reset( void )
|
|||||||
gHR.Reset();
|
gHR.Reset();
|
||||||
|
|
||||||
//VidInit();
|
//VidInit();
|
||||||
|
wrect_t nullrc = {};
|
||||||
|
SetCrosshair( 0, nullrc, 0, 0, 0 ); // reset crosshair
|
||||||
|
m_pWeapon = NULL; // reset last weapon
|
||||||
}
|
}
|
||||||
|
|
||||||
int CHudAmmo::VidInit( void )
|
int CHudAmmo::VidInit( void )
|
||||||
@ -606,22 +609,24 @@ int CHudAmmo::MsgFunc_CurWeapon( const char *pszName, int iSize, void *pbuf )
|
|||||||
|
|
||||||
m_pWeapon = pWeapon;
|
m_pWeapon = pWeapon;
|
||||||
|
|
||||||
if( gHUD.m_iFOV >= 90 )
|
if( !( gHUD.m_iHideHUDDisplay & ( HIDEHUD_WEAPONS | HIDEHUD_ALL ) ) )
|
||||||
{
|
{
|
||||||
// normal crosshairs
|
if( gHUD.m_iFOV >= 90 )
|
||||||
if( fOnTarget && m_pWeapon->hAutoaim )
|
{
|
||||||
SetCrosshair( m_pWeapon->hAutoaim, m_pWeapon->rcAutoaim, 255, 255, 255 );
|
// normal crosshairs
|
||||||
|
if( fOnTarget && m_pWeapon->hAutoaim )
|
||||||
|
SetCrosshair( m_pWeapon->hAutoaim, m_pWeapon->rcAutoaim, 255, 255, 255 );
|
||||||
|
else
|
||||||
|
SetCrosshair( m_pWeapon->hCrosshair, m_pWeapon->rcCrosshair, 255, 255, 255 );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
SetCrosshair( m_pWeapon->hCrosshair, m_pWeapon->rcCrosshair, 255, 255, 255 );
|
{
|
||||||
}
|
// zoomed crosshairs
|
||||||
else
|
if( fOnTarget && m_pWeapon->hZoomedAutoaim )
|
||||||
{
|
SetCrosshair( m_pWeapon->hZoomedAutoaim, m_pWeapon->rcZoomedAutoaim, 255, 255, 255 );
|
||||||
// zoomed crosshairs
|
else
|
||||||
if( fOnTarget && m_pWeapon->hZoomedAutoaim )
|
SetCrosshair( m_pWeapon->hZoomedCrosshair, m_pWeapon->rcZoomedCrosshair, 255, 255, 255 );
|
||||||
SetCrosshair( m_pWeapon->hZoomedAutoaim, m_pWeapon->rcZoomedAutoaim, 255, 255, 255 );
|
}
|
||||||
else
|
|
||||||
SetCrosshair( m_pWeapon->hZoomedCrosshair, m_pWeapon->rcZoomedCrosshair, 255, 255, 255 );
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_fFade = 200.0f; //!!!
|
m_fFade = 200.0f; //!!!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user