From e46b145fb645c005413c7f34360d1d02498f8898 Mon Sep 17 00:00:00 2001 From: divverent Date: Mon, 6 Sep 2010 06:21:51 +0000 Subject: [PATCH] fix CSQC being unable to use the "effects" field as its fieldoffset never got initialized git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10446 d7cf8633-e32d-0410-b094-e92efae38249 --- csprogs.c | 2 +- progsvm.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/csprogs.c b/csprogs.c index 92a88720..aa438a52 100644 --- a/csprogs.c +++ b/csprogs.c @@ -205,7 +205,7 @@ qboolean CSQC_AddRenderEdict(prvm_edict_t *ed, int edictnum) if((val = PRVM_EDICTFIELDVALUE(ed, prog->fieldoffsets.scale)) && val->_float) entrender->scale = scale = val->_float; if((val = PRVM_EDICTFIELDVALUE(ed, prog->fieldoffsets.colormod)) && VectorLength2(val->vector)) VectorCopy(val->vector, entrender->colormod); if((val = PRVM_EDICTFIELDVALUE(ed, prog->fieldoffsets.glowmod)) && VectorLength2(val->vector)) VectorCopy(val->vector, entrender->glowmod); - if((val = PRVM_EDICTFIELDVALUE(ed, prog->fieldoffsets.effects)) && val->_float) entrender->effects |= (int)val->_float; + if(ed->fields.client->effects) entrender->effects |= (int)ed->fields.client->effects; if((val = PRVM_EDICTFIELDVALUE(ed, prog->fieldoffsets.tag_entity)) && val->edict) { int tagentity; diff --git a/progsvm.h b/progsvm.h index 323ae71b..85610510 100644 --- a/progsvm.h +++ b/progsvm.h @@ -191,7 +191,6 @@ typedef struct prvm_prog_fieldoffsets_s int discardabledemo; // ssqc int dphitcontentsmask; // ssqc / csqc int drawonlytoclient; // ssqc - int effects; // ssqc / csqc int exteriormodeltoclient; // ssqc int fatness; // ssqc / csqc int forceshader; // csqc -- 2.39.2