]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
more !string fixes
authorRudolf Polzer <divverent@xonotic.org>
Thu, 3 Jan 2013 20:33:53 +0000 (21:33 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Thu, 3 Jan 2013 20:33:53 +0000 (21:33 +0100)
qcsrc/server/playerstats.qc
qcsrc/server/race.qc

index 4bcc869ba1f44fa048412ca8dc93461aae79d717..9c0d38c161655d421a259a8dda679acf09c81653 100644 (file)
@@ -70,7 +70,7 @@ void PlayerStats_AddPlayer(entity e)
        else if(clienttype(e) == CLIENTTYPE_BOT)
                s = sprintf("bot#%g#%s", skill, e.cleanname);
 
-       if(!s || find(world, playerstats_id, s)) // already have one of the ID - next one can't be tracked then!
+       if((s == "") || find(world, playerstats_id, s)) // already have one of the ID - next one can't be tracked then!
        {
                if(clienttype(e) == CLIENTTYPE_BOT)
                        s = sprintf("bot#%d", e.playerid);
index c7c38165dd9845225420660ddede82ae65de8dd5..6d764855511131ffa4450a2e2b04b9ffd37f5ba3 100644 (file)
@@ -817,11 +817,11 @@ void spawnfunc_trigger_race_checkpoint()
        waypoint_spawnforitem_force(self, trace_endpos);
        self.nearestwaypointtimeout = time + 1000000000;
 
-       if(!self.message)
+       if(self.message == "")
                self.message = "went backwards";
-       if (!self.message2)
+       if (self.message2 == "")
                self.message2 = "was pushed backwards by";
-       if (!self.race_penalty_reason)
+       if (self.race_penalty_reason == "")
                self.race_penalty_reason = "missing a checkpoint";
        
        self.race_checkpoint = self.cnt;
@@ -870,11 +870,11 @@ void spawnfunc_target_checkpoint() // defrag entity
        waypoint_spawnforitem_force(self, trace_endpos);
        self.nearestwaypointtimeout = time + 1000000000;
 
-       if(!self.message)
+       if(self.message == "")
                self.message = "went backwards";
-       if (!self.message2)
+       if (self.message2 == "")
                self.message2 = "was pushed backwards by";
-       if (!self.race_penalty_reason)
+       if (self.race_penalty_reason == "")
                self.race_penalty_reason = "missing a checkpoint";
 
        if(self.classname == "target_startTimer")
@@ -1102,7 +1102,7 @@ void spawnfunc_trigger_race_penalty()
        if not(self.spawnflags & 1)
                self.touch = penalty_touch;
 
-       if (!self.race_penalty_reason)
+       if (self.race_penalty_reason == "")
                self.race_penalty_reason = "missing a checkpoint";
        if (!self.race_penalty)
                self.race_penalty = 5;