diff options
author | Andrey Nazarov <skuller@skuller.net> | 2013-04-12 20:27:22 +0400 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2013-04-12 20:30:47 +0400 |
commit | 0e693b55ff8499ed9c96da0c3bba7a39de5b416b (patch) | |
tree | aab85f0de60e325e866ddaaa1bcecc78e18ebcd3 | |
parent | b78b8558aff4fa8038c4f7f40de582b267a732bd (diff) |
Don't project smoke model shadow.
-rw-r--r-- | inc/refresh/refresh.h | 2 | ||||
-rw-r--r-- | src/client/entities.c | 3 | ||||
-rw-r--r-- | src/client/tent.c | 2 | ||||
-rw-r--r-- | src/refresh/gl/mesh.c | 7 |
4 files changed, 7 insertions, 7 deletions
diff --git a/inc/refresh/refresh.h b/inc/refresh/refresh.h index fdc2440..4389799 100644 --- a/inc/refresh/refresh.h +++ b/inc/refresh/refresh.h @@ -46,7 +46,9 @@ with this program; if not, write to the Free Software Foundation, Inc., #define SHELL_WHITE_COLOR 0xD7 +// NOTE: these flags are intentionally the same value #define RF_LEFTHAND 0x80000000 +#define RF_NOSHADOW 0x80000000 #define RF_SHELL_MASK (RF_SHELL_RED | RF_SHELL_GREEN | RF_SHELL_BLUE | \ RF_SHELL_DOUBLE | RF_SHELL_HALF_DAM) diff --git a/src/client/entities.c b/src/client/entities.c index 4983e04..748ce4a 100644 --- a/src/client/entities.c +++ b/src/client/entities.c @@ -20,6 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "client.h" extern qhandle_t cl_mod_powerscreen; +extern qhandle_t cl_mod_laser; extern qhandle_t cl_sfx_footsteps[4]; /* @@ -609,6 +610,8 @@ static void CL_AddPacketEntities(void) ent.skinnum = s1->skinnum; ent.skin = 0; ent.model = cl.model_draw[s1->modelindex]; + if (ent.model == cl_mod_laser) + renderfx |= RF_NOSHADOW; } } diff --git a/src/client/tent.c b/src/client/tent.c index 8d8cf56..99224b2 100644 --- a/src/client/tent.c +++ b/src/client/tent.c @@ -202,7 +202,7 @@ void CL_SmokeAndFlash(vec3_t origin) VectorCopy(origin, ex->ent.origin); ex->type = ex_misc; ex->frames = 4; - ex->ent.flags = RF_TRANSLUCENT; + ex->ent.flags = RF_TRANSLUCENT | RF_NOSHADOW; ex->start = cl.servertime - CL_FRAMETIME; ex->ent.model = cl_mod_smoke; diff --git a/src/refresh/gl/mesh.c b/src/refresh/gl/mesh.c index 490a64e..c10ab45 100644 --- a/src/refresh/gl/mesh.c +++ b/src/refresh/gl/mesh.c @@ -20,8 +20,6 @@ with this program; if not, write to the Free Software Foundation, Inc., typedef void (*tessfunc_t)(const maliasmesh_t *); -extern qhandle_t cl_mod_laser; - static int oldframenum; static int newframenum; static float frontlerp; @@ -450,10 +448,7 @@ static void setup_shadow(void) if (!gl_shadows->integer) return; - if (glr.ent->flags & RF_WEAPONMODEL) - return; - - if (glr.ent->model == cl_mod_laser) + if (glr.ent->flags & (RF_WEAPONMODEL | RF_NOSHADOW)) return; if (!glr.lightpoint.surf) |