Advertisement
Guest User

Untitled

a guest
Nov 18th, 2018
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. if ( iId < 1 )
  2. {
  3. SetCrosshair(0, nullrc, 0, 0, 0);
  4. m_pWeapon = NULL; // Addition by Peter Brev thanks to Solokiller
  5. return 0;
  6. }
  7.  
  8. if ( g_iUser1 != OBS_IN_EYE )
  9. {
  10. // Is player dead???
  11. if ((iId == -1) && (iClip == -1))
  12. {
  13. gHUD.m_fPlayerDead = TRUE;
  14. gpActiveSel = NULL;
  15. return 1;
  16. }
  17. gHUD.m_fPlayerDead = FALSE;
  18. }
  19.  
  20. WEAPON *pWeapon = gWR.GetWeapon( iId );
  21.  
  22. if ( !pWeapon )
  23. return 0;
  24.  
  25. if ( iClip < -1 )
  26. pWeapon->iClip = abs(iClip);
  27. else
  28. pWeapon->iClip = iClip;
  29.  
  30.  
  31. if ( iState == 0 ) // we're not the current weapon, so update no more
  32. return 1;
  33.  
  34. m_pWeapon = pWeapon;
  35.  
  36. // Copied code from SoHL 1.8 below
  37. if ( gHUD.m_iHideHUDDisplay & ( HIDEHUD_CUSTOMCROSSHAIR ))
  38. {
  39. WEAPON *ccWeapon = gWR.GetWeapon(7);
  40. SetCrosshair(ccWeapon->hCrosshair, ccWeapon->rcCrosshair, 255, 255, 255);
  41. }
  42. else if ( !(gHUD.m_iHideHUDDisplay & ( HIDEHUD_WEAPONS | HIDEHUD_ALL )) )
  43. {
  44. if ( gHUD.m_iFOV >= 90 )
  45. { // normal crosshairs
  46. if (fOnTarget && m_pWeapon->hAutoaim)
  47. SetCrosshair(m_pWeapon->hAutoaim, m_pWeapon->rcAutoaim, 255, 255, 255);
  48. else
  49. SetCrosshair(m_pWeapon->hCrosshair, m_pWeapon->rcCrosshair, 255, 255, 255);
  50. }
  51. else
  52. { // zoomed crosshairs
  53. if (fOnTarget && m_pWeapon->hZoomedAutoaim)
  54. SetCrosshair(m_pWeapon->hZoomedAutoaim, m_pWeapon->rcZoomedAutoaim, 255, 255, 255);
  55. else
  56. SetCrosshair(m_pWeapon->hZoomedCrosshair, m_pWeapon->rcZoomedCrosshair, 255, 255, 255);
  57.  
  58. }
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement