Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions cl_dll/hud/sniperscope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ int CHudSniperScope::VidInit()
gRenderAPI.Host_Error( "^3Error^7: Cannot load Sniper Scope arcs. Check sprites/scope_arc*.tga files\n" );
}

left = (TrueWidth - TrueHeight)/2.0;
right = left + TrueHeight;
centerx = TrueWidth/2.0;
centery = TrueHeight/2.0;
left = (ScreenWidth - ScreenHeight)/2.0;
right = left + ScreenHeight;
centerx = ScreenWidth/2.0;
centery = ScreenHeight/2.0;
return 1;
}

Expand All @@ -93,17 +93,17 @@ int CHudSniperScope::Draw(float flTime)

DrawTexture( m_iScopeArc[0], left, 0, centerx, centery );
DrawTexture( m_iScopeArc[1], centerx, 0, right, centery );
DrawTexture( m_iScopeArc[2], centerx, centery, right, TrueHeight );
DrawTexture( m_iScopeArc[3], left, centery, centerx, TrueHeight );
DrawTexture( m_iScopeArc[2], centerx, centery, right, ScreenHeight );
DrawTexture( m_iScopeArc[3], left, centery, centerx, ScreenHeight );

gRenderAPI.GL_Bind( 0, gHUD.m_WhiteTex );
// gEngfuncs.pTriAPI->Begin( TRI_QUADS );
DrawUtils::Draw2DQuad( 0, 0, left + 2, TrueHeight );
DrawUtils::Draw2DQuad( right, 0, right + ( TrueWidth - right ), TrueHeight );
DrawUtils::Draw2DQuad( 0, 0, left + 2, ScreenHeight );
DrawUtils::Draw2DQuad( right, 0, right + ( ScreenWidth - right ), ScreenHeight );

// default crosshair pixel perfect lines
DrawUtils::Draw2DQuad( left, centery + 1, right, centery + 2 );
DrawUtils::Draw2DQuad( centerx - 1, 0, centerx, TrueHeight );
DrawUtils::Draw2DQuad( centerx - 1, 0, centerx, ScreenHeight );
// gEngfuncs.pTriAPI->End();

return 0;
Expand Down
Loading