From: Rudolf Polzer Date: Thu, 3 Jan 2013 20:33:53 +0000 (+0100) Subject: more !string fixes X-Git-Tag: xonotic-v0.7.0~135 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e49198c3f13f62e1baa35d9d707b413ef105adbc;p=xonotic%2Fxonotic-data.pk3dir.git more !string fixes --- diff --git a/qcsrc/server/playerstats.qc b/qcsrc/server/playerstats.qc index 4bcc869ba..9c0d38c16 100644 --- a/qcsrc/server/playerstats.qc +++ b/qcsrc/server/playerstats.qc @@ -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); diff --git a/qcsrc/server/race.qc b/qcsrc/server/race.qc index c7c38165d..6d7648555 100644 --- a/qcsrc/server/race.qc +++ b/qcsrc/server/race.qc @@ -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;