X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fteamplay.qc;h=163f71a099c7c0cba598d7d4ccc7282ced4f91e1;hp=1ed2f533b3a923c93981ef14ad5403eb847a0f25;hb=db20e10f5f82423356007ed51deb53c05f964a9a;hpb=64d58e3d7b97cf1c2e27628107dd3876f82f9992 diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index 1ed2f533b..163f71a09 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -517,7 +517,7 @@ void CheckAllowedTeams (entity for_whom) if(autocvar_bot_vs_human > 0) { // bots are all blue - if(clienttype(for_whom) == CLIENTTYPE_BOT) + if(IS_BOT_CLIENT(for_whom)) c1 = c3 = c4 = -1; else c2 = -1; @@ -525,7 +525,7 @@ void CheckAllowedTeams (entity for_whom) else { // bots are all red - if(clienttype(for_whom) == CLIENTTYPE_BOT) + if(IS_BOT_CLIENT(for_whom)) c2 = c3 = c4 = -1; else c1 = -1; @@ -563,7 +563,7 @@ void GetTeamCounts(entity ignore) FOR_EACH_CLIENT(head) { float t; - if(head.classname == "player") + if(IS_PLAYER(head)) t = head.team; else if(head.team_forced > 0) t = head.team_forced; // reserve the spot @@ -572,7 +572,7 @@ void GetTeamCounts(entity ignore) if(head != ignore)// && head.netname != "") { value = PlayerValue(head); - if(clienttype(head) == CLIENTTYPE_BOT) + if(IS_BOT_CLIENT(head)) bvalue = value; else bvalue = 0; @@ -653,7 +653,7 @@ float TeamSmallerEqThanTeam(float ta, float tb, entity e) if(ta == tb) return TRUE; - if(clienttype(e) == CLIENTTYPE_REAL) + if(IS_REAL_CLIENT(e)) { if(bots_would_leave) { @@ -711,7 +711,7 @@ float FindSmallestTeam(entity pl, float ignore_pl) if(totalteams <= 1) { - if(autocvar_g_campaign && pl && clienttype(pl) == CLIENTTYPE_REAL) + if(autocvar_g_campaign && pl && IS_REAL_CLIENT(pl)) return 1; // special case for campaign and player joining else if(g_domination) error("Too few teams available for domination\n"); @@ -894,7 +894,7 @@ void SV_ChangeTeam(float _color) // bprint("allow change teams from ", ftos(steam), " to ", ftos(dteam), "\n"); - if(self.classname == "player" && steam != dteam) + if(IS_PLAYER(self) && steam != dteam) { // reduce frags during a team change TeamchangeFrags(self); @@ -902,7 +902,7 @@ void SV_ChangeTeam(float _color) SetPlayerTeam(self, dteam, steam, FALSE); - if(self.classname == "player" && steam != dteam) + if(IS_PLAYER(self) && steam != dteam) { // kill player when changing teams if(self.deadflag == DEAD_NO)