]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a command which allows printing tag information of a model to the player
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 29 Oct 2011 10:48:51 +0000 (13:48 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 29 Oct 2011 10:48:51 +0000 (13:48 +0300)
qcsrc/server/mutators/sandbox.qc

index 89c8b20fd152ce51c660376667b4bebfffb9caa8..86e48936e914e2254fe1933a79ce1c4099ee4b17 100644 (file)
@@ -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;