void CHudAmmo::UpdateWeaponHUD( CBasePlayerWeapon* pWeapon, bool bOnTarget ) { auto pHUDInfo = pWeapon->GetWeaponInfo()->GetHUDInfo(); if( gHUD.m_iFOV >= 90 ) { // normal crosshairs if( bOnTarget && pHUDInfo->GetAutoAim().hSprite ) SetCrosshair( pHUDInfo->GetAutoAim().hSprite, pHUDInfo->GetAutoAim().rect, 255, 255, 255 ); else SetCrosshair( pHUDInfo->GetCrosshair().hSprite, pHUDInfo->GetCrosshair().rect, 255, 255, 255 ); } else { // zoomed crosshairs if( bOnTarget && pHUDInfo->GetZoomedAutoAim().hSprite ) SetCrosshair( pHUDInfo->GetZoomedAutoAim().hSprite, pHUDInfo->GetZoomedAutoAim().rect, 255, 255, 255 ); else SetCrosshair( pHUDInfo->GetZoomedCrosshair().hSprite, pHUDInfo->GetZoomedCrosshair().rect, 255, 255, 255 ); } m_fFade = 200.0f; //!!! m_iFlags |= HUD_ACTIVE; }
void CHudAmmo::UpdateWeaponHUD( CBasePlayerWeapon* pWeapon, bool bOnTarget ) { auto pHUDInfo = pWeapon->GetWeaponInfo()->GetHUDInfo(); //TODO: define 90 constant - Solokiller if( Hud().GetFOV() >= 90 ) { // normal crosshairs if( bOnTarget && pHUDInfo->GetAutoAim().hSprite ) SetCrosshair( pHUDInfo->GetAutoAim().hSprite, pHUDInfo->GetAutoAim().rect, 255, 255, 255 ); else SetCrosshair( pHUDInfo->GetCrosshair().hSprite, pHUDInfo->GetCrosshair().rect, 255, 255, 255 ); } else { // zoomed crosshairs if( bOnTarget && pHUDInfo->GetZoomedAutoAim().hSprite ) SetCrosshair( pHUDInfo->GetZoomedAutoAim().hSprite, pHUDInfo->GetZoomedAutoAim().rect, 255, 255, 255 ); else SetCrosshair( pHUDInfo->GetZoomedCrosshair().hSprite, pHUDInfo->GetZoomedCrosshair().rect, 255, 255, 255 ); } m_fFade = 200.0f; //!!! GetFlags() |= HUD_ACTIVE; }