Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( iId < 1 )
- {
- SetCrosshair(0, nullrc, 0, 0, 0);
- m_pWeapon = NULL; // Addition by Peter Brev thanks to Solokiller
- return 0;
- }
- if ( g_iUser1 != OBS_IN_EYE )
- {
- // Is player dead???
- if ((iId == -1) && (iClip == -1))
- {
- gHUD.m_fPlayerDead = TRUE;
- gpActiveSel = NULL;
- return 1;
- }
- gHUD.m_fPlayerDead = FALSE;
- }
- WEAPON *pWeapon = gWR.GetWeapon( iId );
- if ( !pWeapon )
- return 0;
- if ( iClip < -1 )
- pWeapon->iClip = abs(iClip);
- else
- pWeapon->iClip = iClip;
- if ( iState == 0 ) // we're not the current weapon, so update no more
- return 1;
- m_pWeapon = pWeapon;
- // Copied code from SoHL 1.8 below
- if ( gHUD.m_iHideHUDDisplay & ( HIDEHUD_CUSTOMCROSSHAIR ))
- {
- WEAPON *ccWeapon = gWR.GetWeapon(7);
- SetCrosshair(ccWeapon->hCrosshair, ccWeapon->rcCrosshair, 255, 255, 255);
- }
- else if ( !(gHUD.m_iHideHUDDisplay & ( HIDEHUD_WEAPONS | HIDEHUD_ALL )) )
- {
- 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
- { // 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);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement