]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Mod_Alias_GetTagIndexForName returns an 1-based index, not 0-based, so fix skel_find_...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 24 May 2010 07:43:45 +0000 (07:43 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 24 May 2010 07:43:45 +0000 (07:43 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10217 d7cf8633-e32d-0410-b094-e92efae38249

clvm_cmds.c

index 20c38faa9534204f87f137e2ebf93370fe451c65..6779946e6c1b5b0cb56fa6fd902a9da49f08a0ef 100644 (file)
@@ -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)