From: divverent Date: Wed, 4 Feb 2015 12:24:00 +0000 (+0000) Subject: Use the correct bones count when parsing E5_COMPLEXANIMATION. X-Git-Tag: xonotic-v0.8.1~29^2~19 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=099f49b597d4560a08923633ab8305b3c6f81264;p=xonotic%2Fdarkplaces.git 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 --- 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++)