From 72943b86b04da4f0ee7b4074287ec3743b8cd077 Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 18 Feb 2010 06:10:59 +0000 Subject: [PATCH] added RF_FULLBRIGHT and RF_NOSHADOW renderflags for CSQC git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9982 d7cf8633-e32d-0410-b094-e92efae38249 --- csprogs.c | 5 +++-- csprogs.h | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/csprogs.c b/csprogs.c index f8e47a65..ff127451 100644 --- a/csprogs.c +++ b/csprogs.c @@ -176,6 +176,7 @@ qboolean CSQC_AddRenderEdict(prvm_edict_t *ed, int edictnum) r_refdef.scene.entities[r_refdef.scene.numentities++] = entrender; entrender->entitynumber = edictnum; //entrender->shadertime = 0; // shadertime was set by spawn() + entrender->flags = 0; entrender->alpha = 1; entrender->scale = 1; VectorSet(entrender->colormod, 1, 1, 1); @@ -255,7 +256,6 @@ qboolean CSQC_AddRenderEdict(prvm_edict_t *ed, int edictnum) if(renderflags & RF_NOCULL) entrender->flags |= RENDER_NOCULL; if(renderflags & RF_DEPTHHACK) entrender->flags |= RENDER_NODEPTHTEST; if(renderflags & RF_ADDITIVE) entrender->flags |= RENDER_ADDITIVE; - } c = (int)ed->fields.client->colormap; @@ -270,7 +270,7 @@ qboolean CSQC_AddRenderEdict(prvm_edict_t *ed, int edictnum) // either fullbright or lit if(!r_fullbright.integer) { - if (!(entrender->effects & EF_FULLBRIGHT)) + if (!(entrender->effects & EF_FULLBRIGHT) && !(renderflags & RF_FULLBRIGHT)) entrender->flags |= RENDER_LIGHT; else if(r_equalize_entities_fullbright.integer) entrender->flags |= RENDER_LIGHT | RENDER_EQUALIZE; @@ -278,6 +278,7 @@ qboolean CSQC_AddRenderEdict(prvm_edict_t *ed, int edictnum) // hide player shadow during intermission or nehahra movie if (!(entrender->effects & (EF_NOSHADOW | EF_ADDITIVE | EF_NODEPTHTEST)) && (entrender->alpha >= 1) + && !(renderflags & RF_NOSHADOW) && !(entrender->flags & RENDER_VIEWMODEL) && (!(entrender->flags & RENDER_EXTERIORMODEL) || (!cl.intermission && cls.protocol != PROTOCOL_NEHAHRAMOVIE && !cl_noplayershadow.integer))) entrender->flags |= RENDER_SHADOW; diff --git a/csprogs.h b/csprogs.h index c4db62bb..6e2e517c 100644 --- a/csprogs.h +++ b/csprogs.h @@ -51,6 +51,9 @@ #define RF_USETRANSPARENTOFFSET 64 // Allows QC to customize origin used for transparent sorting via transparent_origin global, helps to fix transparent sorting bugs on a very large entities #define RF_NOCULL 128 // do not cull this entity using r_cullentities, for large outdoor entities (asteroids on the sky. etc) +#define RF_FULLBRIGHT 256 +#define RF_NOSHADOW 512 + extern cvar_t csqc_progname; //[515]: csqc crc check and right csprogs name according to progs.dat extern cvar_t csqc_progcrc; extern cvar_t csqc_progsize; -- 2.39.2