X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Farena.qc;h=b3f28843a977e105ddf648302b636990b1637110;hp=ef81fd92bad7db138edb2fa1e1067d252bae875b;hb=db20e10f5f82423356007ed51deb53c05f964a9a;hpb=64d58e3d7b97cf1c2e27628107dd3876f82f9992 diff --git a/qcsrc/server/arena.qc b/qcsrc/server/arena.qc index ef81fd92b..b3f28843a 100644 --- a/qcsrc/server/arena.qc +++ b/qcsrc/server/arena.qc @@ -47,7 +47,7 @@ void reset_map(float dorespawn) race_ReadyRestart(); for(self = world; (self = nextent(self)); ) - if(clienttype(self) == CLIENTTYPE_NOTACLIENT) + if(IS_NOT_A_CLIENT(self)) { if(self.reset) { @@ -64,7 +64,7 @@ void reset_map(float dorespawn) // Waypoints and assault start come LAST for(self = world; (self = nextent(self)); ) - if(clienttype(self) == CLIENTTYPE_NOTACLIENT) + if(IS_NOT_A_CLIENT(self)) { if(self.reset2) { @@ -77,7 +77,7 @@ void reset_map(float dorespawn) // on spawnpoint entities which have to be reset first --blub if(dorespawn) FOR_EACH_CLIENT(self) { - if(self.flags & FL_CLIENT) // reset all players + if(IS_CLIENT(self)) // reset all players { if(g_arena) { @@ -92,7 +92,7 @@ void reset_map(float dorespawn) } else if(g_freezetag) { - if(self.classname == "player") + if(IS_PLAYER(self)) PutClientInServer(); } else @@ -106,7 +106,7 @@ void reset_map(float dorespawn) if (restart_mapalreadyrestarted || (time < game_starttime)) { //NEW: changed behaviour so that it prevents that previous spectators/observers suddenly spawn as players - if (self.classname == "player") { + if (IS_PLAYER(self)) { //PlayerScore_Clear(self); if(g_lms) PlayerScore_Add(self, SP_LMS_LIVES, LMS_NewPlayerLives()); @@ -126,7 +126,7 @@ void reset_map(float dorespawn) kh_Controller_SetThink_NoMsg(autocvar_g_balance_keyhunt_delay_round+(game_starttime - time), kh_StartRound); if(g_arena) - if(champion && champion.classname == "player" && player_count > 1) + if(champion && IS_PLAYER(champion) && player_count > 1) UpdateFrags(champion, +1); self = oldself; @@ -255,7 +255,7 @@ void Arena_Warmup() if (g_arena) { FOR_EACH_CLIENT(e) { - if(e.spawned && e.classname == "player") + if(e.spawned && IS_PLAYER(e)) e.player_blocked = 1; } }