From 099f49b597d4560a08923633ab8305b3c6f81264 Mon Sep 17 00:00:00 2001 From: divverent Date: Wed, 4 Feb 2015 12:24:00 +0000 Subject: [PATCH] Use the correct bones count when parsing E5_COMPLEXANIMATION. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12141 d7cf8633-e32d-0410-b094-e92efae38249 --- protocol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protocol.c b/protocol.c index 85db0877..c0c8ac9d 100644 --- a/protocol.c +++ b/protocol.c @@ -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++) -- 2.39.2