From 6b9d903de3ec0ac28f43f18e2df4ab7b09cbf1d5 Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 8 May 2011 12:56:22 +0000 Subject: [PATCH] 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 --- csprogs.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) 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; -- 2.39.2