]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix setattachment (it was setting tag_index to i, should have been i + 1), also added...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 28 Jul 2003 11:02:26 +0000 (11:02 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 28 Jul 2003 11:02:26 +0000 (11:02 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3343 d7cf8633-e32d-0410-b094-e92efae38249

pr_cmds.c

index 37f7222aca069ec030035c29f3e4e1ced77c6c9f..1eeefc2dc80b8e88f7858df7dc5181c0ea0fc224 100644 (file)
--- a/pr_cmds.c
+++ b/pr_cmds.c
@@ -2980,8 +2980,12 @@ void PF_setattachment (void)
                        if (model->alias.aliasnum_tags)
                                for (i = 0;i < model->alias.aliasnum_tags;i++)
                                        if (!strcmp(tagname, model->alias.aliasdata_tags[i].name))
-                                               v->_float = i;
+                                               v->_float = i + 1;
+                       if (v->_float == 0)
+                               Con_DPrintf("setattachment(edict %i, edict %i, string \"%s\"): tried to find tag named \"%s\" on entity %i (model \"%s\") but could not find it\n", NUM_FOR_EDICT(e), NUM_FOR_EDICT(tagentity), tagname, tagname, NUM_FOR_EDICT(tagentity), model->name);
                }
+               else
+                       Con_DPrintf("setattachment(edict %i, edict %i, string \"%s\"): tried to find tag named \"%s\" on entity %i but it has no model\n", NUM_FOR_EDICT(e), NUM_FOR_EDICT(tagentity), tagname, tagname, NUM_FOR_EDICT(tagentity));
        }
 }