]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Use the correct bones count when parsing E5_COMPLEXANIMATION.
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 4 Feb 2015 12:24:00 +0000 (12:24 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 4 Feb 2015 12:24:00 +0000 (12:24 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12141 d7cf8633-e32d-0410-b094-e92efae38249

protocol.c

index 85db0877cb1311556d2dfcc924a0cf07d88bed6d..c0c8ac9d7e78ad07a44ab4e6862c6243cf7602f2 100644 (file)
@@ -2540,8 +2540,8 @@ static void EntityState5_ReadUpdate(entity_state_t *s, int number)
                        if (!skeleton->relativetransforms || skeleton->model != model)
                        {
                                skeleton->model = model;
-                               skeleton->relativetransforms = (matrix4x4_t *) Mem_Realloc(cls.levelmempool, skeleton->relativetransforms, sizeof(*skeleton->relativetransforms) * skeleton->model->num_bones);
-                               for (bonenum = 0;bonenum < model->num_bones;bonenum++)
+                               skeleton->relativetransforms = (matrix4x4_t *) Mem_Realloc(cls.levelmempool, skeleton->relativetransforms, sizeof(*skeleton->relativetransforms) * numbones);
+                               for (bonenum = 0;bonenum < numbones;bonenum++)
                                        skeleton->relativetransforms[bonenum] = identitymatrix;
                        }
                        for (bonenum = 0;bonenum < numbones;bonenum++)