]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
more stupid error code passing
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 7 Nov 2009 13:01:47 +0000 (13:01 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 7 Nov 2009 13:01:47 +0000 (13:01 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9451 d7cf8633-e32d-0410-b094-e92efae38249

cl_main.c
clvm_cmds.c
csprogs.h

index c369a4362e0e79786a7ab853d43ee1c16310cc82..58241741e50fed9dcff0475145c9530daa4e2b7e 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -920,7 +920,7 @@ void CL_UpdateNetworkEntity(entity_t *e, int recursionlimit, qboolean interpolat
                // FIXME: use a model function to get tag info (need to handle skeletal)
                if (e->state_current.tagentity && e->state_current.tagindex >= 1)
                {
-                       if(CL_BlendTagMatrix(&t->render, e->state_current.tagindex - 1, &blendmatrix))
+                       if(!CL_BlendTagMatrix(&t->render, e->state_current.tagindex - 1, &blendmatrix)) // i.e. no error
                        {
                                // concat the tag matrices onto the entity matrix
                                Matrix4x4_Concat(&tempmatrix, &t->render.matrix, &blendmatrix);
index 0e408f4f4f0a0a1ecf9c6b987349ba3979f41d69..fc0ad58546b7577db59a85e59cb0674d8f31f2e8 100644 (file)
@@ -2276,6 +2276,7 @@ void CL_GetEntityMatrix (prvm_edict_t *ent, matrix4x4_t *out, qboolean viewmatri
 int CL_GetEntityLocalTagMatrix(prvm_edict_t *ent, int tagindex, matrix4x4_t *out)
 {
        int frame;
+       int ret;
        dp_model_t *model;
        entity_render_t cheatentity;
        if (tagindex >= 0
@@ -2291,15 +2292,13 @@ int CL_GetEntityLocalTagMatrix(prvm_edict_t *ent, int tagindex, matrix4x4_t *out
                cheatentity.model = model;
                CL_LoadFrameGroupBlend(ent, &cheatentity);
                R_LerpAnimation(&cheatentity);
-               if(!CL_BlendTagMatrix(&cheatentity, tagindex, out))
-               {
+               ret = CL_BlendTagMatrix(&cheatentity, tagindex, out);
+               if(ret)
                        *out = identitymatrix;
-                       return false;
-               }
-               return true;
+               return ret;
        }
        *out = identitymatrix;
-       return false;
+       return 0;
 }
 
 // Warnings/errors code:
index 1cd41deb49f04fd4bc55d9a008a7cc4061f920f5..e930132e89df81ad42740a7c09bebf6e9a4425bf 100644 (file)
--- a/csprogs.h
+++ b/csprogs.h
@@ -62,6 +62,6 @@ qboolean MakeDownloadPacket(const char *filename, unsigned char *data, unsigned
 qboolean CL_VM_GetEntitySoundOrigin(int entnum, vec3_t out);
 
 void CL_LoadFrameGroupBlend(prvm_edict_t *ed, entity_render_t *entrender);
-qboolean CL_BlendTagMatrix(entity_render_t *entrender, int tagindex, matrix4x4_t *blendmatrix);
+int CL_BlendTagMatrix(entity_render_t *entrender, int tagindex, matrix5x4_t *blendmatrix); // returns 0 or an error code
 
 #endif