Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void CrossHair( int iSize )
- {
- int x = 0;
- int y = 0;
- HL2::m_pEngine->GetScreenSize( x, y );
- x /= 2;
- y /= 2;
- if( cvars::misc_crosshair == 1 )
- {
- gRenderer.DrawRect( x - iSize, y, iSize * 2 + 1, 1, COLORCODE( 255, 0, 0, 255 ) );
- gRenderer.DrawRect( x, y - iSize, 1, iSize * 2 + 1, COLORCODE( 255, 0, 0, 255 ) );
- }
- else if( cvars::misc_crosshair == 2 )
- {
- gRenderer.DrawRect( x - iSize, y, iSize * 2 + 1, 1, COLORCODE( 255, 0, 0, 255 ) );
- gRenderer.DrawRect( x, y - iSize, 1, iSize * 2 + 1, COLORCODE( 255, 0, 0, 255 ) );
- /*
- 2
- _
- 1-> |_|_
- _| | <-3
- 4
- */
- gRenderer.DrawRect( x - iSize, y - iSize, 1, iSize, COLORCODE( 255, 0, 0, 255 ) ); // 1
- gRenderer.DrawRect( x, y - iSize, iSize + 1, 1, COLORCODE( 255, 0, 0, 255 ) ); // 2
- gRenderer.DrawRect( x + iSize + 1, y, 1, iSize + 1, COLORCODE( 255, 0, 0, 255 ) ); // 3
- gRenderer.DrawRect( x - iSize, y + iSize, iSize + 1, 1, COLORCODE( 255, 0, 0, 255 ) ); // 4
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment