]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
No need to use == "" or != "" checks for strings. Dunno why I remember those were...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 25 Oct 2011 12:27:47 +0000 (15:27 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 25 Oct 2011 12:27:47 +0000 (15:27 +0300)
qcsrc/server/mutators/sandbox.qc

index e5e2799fc924046a05170bf58582b4adb51d0915..42cf8f04caf6095dd1b95198378e1755df3054cc 100644 (file)
@@ -131,7 +131,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand)
                        e = sandbox_EditObject(); // you can only copy objects you can edit, so this works
                        if(e != world)
                        {
-                               if(self.object_clipboard != "") // unzone the player's clipboard if it's not empty
+                               if(self.object_clipboard) // unzone the player's clipboard if it's not empty
                                        strunzone(self.object_clipboard);
                                self.object_clipboard = strzone(strcat(e.model, " ", ftos(e.movetype)));
 
@@ -146,7 +146,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerCommand)
                {
                        // spawns a new object using the properties in the player's clipboard
 
-                       if(self.object_clipboard == "") // no object in clipboard
+                       if(!self.object_clipboard) // no object in clipboard
                        {
                                print_to(self, "WARNING: No object in clipboard. You must copy an object before you can paste it");
                                return TRUE;
@@ -205,7 +205,7 @@ MUTATOR_HOOKFUNCTION(sandbox_PlayerPreThink)
 MUTATOR_HOOKFUNCTION(sandbox_ClientDisconnect)
 {
        // unzone the player's clipboard if it's not empty
-       if(self.object_clipboard != "")
+       if(self.object_clipboard)
        {
                strunzone(self.object_clipboard);
                self.object_clipboard = string_null;