From c25325e14b22db99ba2b55a7d1022ed59756f28f Mon Sep 17 00:00:00 2001 From: driAn Date: Mon, 28 Jul 2008 19:42:10 +0000 Subject: [PATCH] fixed xhair opacity git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2236 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/renderhud.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/src/renderhud.cpp b/source/src/renderhud.cpp index 4b387742..5b551b99 100644 --- a/source/src/renderhud.cpp +++ b/source/src/renderhud.cpp @@ -128,12 +128,10 @@ void drawcrosshair(playerent *p, bool showteamwarning) if(crosshair->bpp==32) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); else glBlendFunc(GL_ONE, GL_ONE); glBindTexture(GL_TEXTURE_2D, showteamwarning ? teammatetex->id : crosshair->id); - glBegin(GL_QUADS); glColor3ub(255,255,255); if(crosshairfx) { if(showteamwarning) glColor3ub(255, 0, 0); - else if(p->gunwait) glColor3ub(128,128,128); else if(!m_osok) { if(p->health<=25) glColor3ub(255,0,0); @@ -141,6 +139,7 @@ void drawcrosshair(playerent *p, bool showteamwarning) } } float chsize = (float)crosshairsize * (p->weaponsel->type==GUN_ASSAULT && p->weaponsel->shots > 3 ? 1.4f : 1.0f) * (showteamwarning ? 2.0f : 1.0f); + glBegin(GL_QUADS); glTexCoord2f(0, 0); glVertex2f(VIRTW/2 - chsize, VIRTH/2 - chsize); glTexCoord2f(1, 0); glVertex2f(VIRTW/2 + chsize, VIRTH/2 - chsize); glTexCoord2f(1, 1); glVertex2f(VIRTW/2 + chsize, VIRTH/2 + chsize);