]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Specify "no attachments" when the object had none, and fix a typo
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 30 Oct 2011 10:52:03 +0000 (12:52 +0200)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Sun, 30 Oct 2011 10:52:03 +0000 (12:52 +0200)
qcsrc/server/mutators/sandbox.qc

index 46194714be5a68b46268263deec612c8bc96096d..3d825658836bdf58534330a36e5c0a2736dac71e 100644 (file)
@@ -681,11 +681,14 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand)
                                                                {
                                                                        ++i; // start from 1
                                                                        gettaginfo(e, head.tag_index);
-                                                                       s = strcat(s, "^1attachment ", ftos(i), "^7 has mesh ^3", head.model, "^7 at animation frame ^3", ftos(e.frame));
+                                                                       s = strcat(s, "^1attachment ", ftos(i), "^7 has mesh ^3", head.model, "^7 at animation frame ^3", ftos(head.frame));
                                                                        s = strcat(s, "^7 and is attached to bone ^5", gettaginfo_name, "^7, ");
                                                                }
                                                        }
-                                                       print_to(self, strcat("^2SANDBOX - INFO: ^7Object contains the following ^1", ftos(i), "^7 attachment(s): ", s));
+                                                       if(i) // object contains attachments
+                                                               print_to(self, strcat("^2SANDBOX - INFO: ^7Object contains the following ^1", ftos(i), "^7 attachment(s): ", s));
+                                                       else
+                                                               print_to(self, "^2SANDBOX - INFO: ^7Object contains no attachments");
                                                        return TRUE;
                                        }
                                }