From: havoc Date: Sun, 8 May 2011 12:56:22 +0000 (+0000) Subject: fix RF_VIEWMODEL by using CL_GetTagMatrix on self rather than X-Git-Tag: xonotic-v0.5.0~195 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=52b8e568af85c152870d577102b4d97677d79aa7;p=xonotic%2Fdarkplaces.git fix RF_VIEWMODEL by using CL_GetTagMatrix on self rather than self.tag_entity git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11121 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=6b9d903de3ec0ac28f43f18e2df4ab7b09cbf1d5 --- diff --git a/csprogs.c b/csprogs.c index 33f2987f..88600c39 100644 --- a/csprogs.c +++ b/csprogs.c @@ -210,22 +210,13 @@ qboolean CSQC_AddRenderEdict(prvm_edict_t *ed, int edictnum) 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(ed->fields.client->effects) entrender->effects |= (int)ed->fields.client->effects; - if((val = PRVM_EDICTFIELDVALUE(ed, prog->fieldoffsets.tag_entity)) && val->edict) - { - int tagentity; - int tagindex = 0; - tagentity = val->edict; - if((val = PRVM_EDICTFIELDVALUE(ed, prog->fieldoffsets.tag_index)) && val->_float) - tagindex = (int)val->_float; - CL_GetTagMatrix (&tagmatrix, PRVM_PROG_TO_EDICT(tagentity), tagindex); - } - else - Matrix4x4_CreateIdentity(&tagmatrix); if (!VectorLength2(entrender->colormod)) VectorSet(entrender->colormod, 1, 1, 1); if (!VectorLength2(entrender->glowmod)) VectorSet(entrender->glowmod, 1, 1, 1); + // LordHavoc: use the CL_GetTagMatrix function on self to ensure consistent behavior (duplicate code would be bad) + CL_GetTagMatrix(&tagmatrix, ed, 0); if (renderflags & RF_USEAXIS) { vec3_t left;