From: divverent Date: Mon, 24 May 2010 07:43:45 +0000 (+0000) Subject: Mod_Alias_GetTagIndexForName returns an 1-based index, not 0-based, so fix skel_find_... X-Git-Tag: xonotic-v0.1.0preview~230^2~261 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6587c432a999ab2a1e0bbdac77b555dc711a3939;p=xonotic%2Fdarkplaces.git Mod_Alias_GetTagIndexForName returns an 1-based index, not 0-based, so fix skel_find_bone for that git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10217 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/clvm_cmds.c b/clvm_cmds.c index 20c38faa..6779946e 100644 --- a/clvm_cmds.c +++ b/clvm_cmds.c @@ -3786,7 +3786,7 @@ static void VM_CL_skel_find_bone(void) PRVM_G_FLOAT(OFS_RETURN) = 0; if (skeletonindex < 0 || skeletonindex >= MAX_EDICTS || !(skeleton = prog->skeletons[skeletonindex])) return; - PRVM_G_FLOAT(OFS_RETURN) = Mod_Alias_GetTagIndexForName(skeleton->model, 0, tagname) + 1; + PRVM_G_FLOAT(OFS_RETURN) = Mod_Alias_GetTagIndexForName(skeleton->model, 0, tagname); } // #269 vector(float skel, float bonenum) skel_get_bonerel = #269; // (FTE_CSQC_SKELETONOBJECTS) get matrix of bone in skeleton relative to its parent - sets v_forward, v_right, v_up, returns origin (relative to parent bone)