]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Made CSQC_AddRenderEdict compute the tag matrix if a tag is set.
authorres <res@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 2 Jan 2008 01:08:11 +0000 (01:08 +0000)
committerres <res@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 2 Jan 2008 01:08:11 +0000 (01:08 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7892 d7cf8633-e32d-0410-b094-e92efae38249

clvm_cmds.h [new file with mode: 0644]
csprogs.c

diff --git a/clvm_cmds.h b/clvm_cmds.h
new file mode 100644 (file)
index 0000000..58928c2
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef __CLVM_CMDS_H__
+#define __CLVM_CMDS_H__
+
+int CL_GetTagMatrix (matrix4x4_t *out, prvm_edict_t *ent, int tagindex);
+
+#endif /* __CLVM_CMDS_H__ */
index facc23088d1fde066546eedaf7c1f2a38e927f93..9211626edc0034239af29faf7d99090f79351cb4 100644 (file)
--- a/csprogs.c
+++ b/csprogs.c
@@ -4,6 +4,7 @@
 #include "csprogs.h"
 #include "cl_collision.h"
 #include "snd_main.h"
+#include "clvm_cmds.h"
 
 //============================================================================
 // Client prog handling
@@ -157,8 +158,7 @@ qboolean CSQC_AddRenderEdict(prvm_edict_t *ed)
                tagentity = val->edict;
                if((val = PRVM_EDICTFIELDVALUE(ed, prog->fieldoffsets.tag_index)) && val->_float)
                        tagindex = (int)val->_float;
-               // FIXME: calculate tag matrix
-               Matrix4x4_CreateIdentity(&tagmatrix);
+               CL_GetTagMatrix (&tagmatrix, PRVM_PROG_TO_EDICT(tagentity), tagindex);
        }
        else
                Matrix4x4_CreateIdentity(&tagmatrix);