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