From 2d98166308d2562618a942df9f1c1ad0f24567bf Mon Sep 17 00:00:00 2001 From: driAn Date: Tue, 25 Dec 2007 00:06:30 +0000 Subject: [PATCH] no more hudguns intersecting walls git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1478 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/rendergl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/src/rendergl.cpp b/source/src/rendergl.cpp index 27bf3aaf..9aa7b16f 100644 --- a/source/src/rendergl.cpp +++ b/source/src/rendergl.cpp @@ -552,7 +552,9 @@ VARP(hudgun, 0, 1, 1); void drawhudgun(int w, int h, float aspect, int farplane) { if(scoped && player1->weaponsel->type==GUN_SNIPER) return; - + + glDisable(GL_DEPTH_TEST); + glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective((float)100.0f*h/w, aspect, 0.3f, farplane); // fov fixed at 100° @@ -565,6 +567,8 @@ void drawhudgun(int w, int h, float aspect, int farplane) glLoadIdentity(); gluPerspective((float)fov*h/w, aspect, 0.15f, farplane); glMatrixMode(GL_MODELVIEW); + + glEnable(GL_DEPTH_TEST); } bool outsidemap(physent *pl)