From: Mircea Kitsune Date: Tue, 25 Oct 2011 12:27:47 +0000 (+0300) Subject: No need to use == "" or != "" checks for strings. Dunno why I remember those were... X-Git-Tag: xonotic-v0.6.0~35^2~18^2~176 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=dad2b5f0254e103921f3b65aeda61846f4a9181b;p=xonotic%2Fxonotic-data.pk3dir.git No need to use == "" or != "" checks for strings. Dunno why I remember those were needed... --- diff --git a/qcsrc/server/mutators/sandbox.qc b/qcsrc/server/mutators/sandbox.qc index e5e2799fc..42cf8f04c 100644 --- a/qcsrc/server/mutators/sandbox.qc +++ b/qcsrc/server/mutators/sandbox.qc @@ -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;