}
float closest;
- for(i = 0; gettaginfo(self, i); i++)
+ FOR_EACH_TAG(self)
{
// go through all tags on the player model, choose the one closest to the damage origin
if(!closest || vlen(hitorg - gettaginfo(self, i)) <= vlen(hitorg - gettaginfo(self, closest)))
// generic shutdown handler
void Shutdown();
+
+#ifndef MENUQC
+// loop that goes through all the bones of a model
+#define FOR_EACH_TAG(v) for(i = 1, gettaginfo(v, i);; i++, gettaginfo(v, i)) if not(gettaginfo_name) break; else
+#endif
print_to(self, strcat("^2SANDBOX - INFO: ^7Object is owned by \"^7", e.netname, "^7\", created \"^3", e.message, "^7\", last edited \"^3", e.message2, "^7\""));
return TRUE;
case "mesh":
- for(i = 1; gettaginfo(e, i); i++)
+ FOR_EACH_TAG(e)
s = strcat(s, "^7\"^5", gettaginfo_name, "^7\", ");
print_to(self, strcat("^2SANDBOX - INFO: ^7Object mesh is \"^3", e.model, "^7\" at animation frame ^3", ftos(e.frame), " ^7containing the following tags: ", s));
return TRUE;