From: Mircea Kitsune Date: Sat, 29 Oct 2011 10:48:51 +0000 (+0300) Subject: Add a command which allows printing tag information of a model to the player X-Git-Tag: xonotic-v0.6.0~35^2~18^2~59 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b54b946c0f43b5ea9187baa5b8829d024608123c;p=xonotic%2Fxonotic-data.pk3dir.git Add a command which allows printing tag information of a model to the player --- diff --git a/qcsrc/server/mutators/sandbox.qc b/qcsrc/server/mutators/sandbox.qc index 89c8b20fd..86e48936e 100644 --- a/qcsrc/server/mutators/sandbox.qc +++ b/qcsrc/server/mutators/sandbox.qc @@ -599,8 +599,15 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand) e = sandbox_ObjectEdit_Get(FALSE); if(e != world) { - print_to(self, "^2SANDBOX - INFO: ^7Object seen"); - return TRUE; + switch(argv(2)) + { + case "taginfo": + string tags; + for(i = 0; gettaginfo(e, i); i++) + tags = strcat(tags, "^5", gettaginfo_name, "^7, "); + print_to(self, strcat("^2SANDBOX - INFO: ^7Tag information for ^3", e.model, "^7: ", tags)); + return TRUE; + } } print_to(self, "^1SANDBOX - WARNING: ^7No information could not be found. Make sure you are facing an object"); return TRUE;