From: Lyberta Date: Sun, 4 Jun 2017 15:32:28 +0000 (+0300) Subject: Renamed cbX to numbotsteamX. X-Git-Tag: xonotic-v0.8.5~2482^2~24 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=cc875c9b8cb47f41dfea27232e84194f6191428a;p=xonotic%2Fxonotic-data.pk3dir.git Renamed cbX to numbotsteamX. --- diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index d43457101..ef3559af9 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -230,7 +230,7 @@ void CheckAllowedTeams (entity for_whom) int teams_mask = 0; c1 = c2 = c3 = c4 = -1; - cb1 = cb2 = cb3 = cb4 = 0; + numbotsteam1 = numbotsteam2 = numbotsteam3 = numbotsteam4 = 0; string teament_name = string_null; @@ -358,7 +358,7 @@ void GetTeamCounts(entity ignore) if(c1 >= 0) { c1 = c1 + value; - cb1 = cb1 + bvalue; + numbotsteam1 += bvalue; } } if(t == NUM_TEAM_2) @@ -366,7 +366,7 @@ void GetTeamCounts(entity ignore) if(c2 >= 0) { c2 = c2 + value; - cb2 = cb2 + bvalue; + numbotsteam2 += bvalue; } } if(t == NUM_TEAM_3) @@ -374,7 +374,7 @@ void GetTeamCounts(entity ignore) if(c3 >= 0) { c3 = c3 + value; - cb3 = cb3 + bvalue; + numbotsteam3 += bvalue; } } if(t == NUM_TEAM_4) @@ -382,7 +382,7 @@ void GetTeamCounts(entity ignore) if(c4 >= 0) { c4 = c4 + value; - cb4 = cb4 + bvalue; + numbotsteam4 += bvalue; } } } @@ -393,10 +393,10 @@ void GetTeamCounts(entity ignore) { switch(autocvar_g_campaign_forceteam) { - case 1: if(c1 == cb1) ++c1; break; - case 2: if(c2 == cb2) ++c2; break; - case 3: if(c3 == cb3) ++c3; break; - case 4: if(c4 == cb4) ++c4; break; + case 1: if(c1 == numbotsteam1) ++c1; break; + case 2: if(c2 == numbotsteam2) ++c2; break; + case 3: if(c3 == numbotsteam3) ++c3; break; + case 4: if(c4 == numbotsteam4) ++c4; break; } } } @@ -409,17 +409,17 @@ float TeamSmallerEqThanTeam(float ta, float tb, entity e) switch(ta) { - case 1: ca = c1; cba = cb1; sa = team1_score; break; - case 2: ca = c2; cba = cb2; sa = team2_score; break; - case 3: ca = c3; cba = cb3; sa = team3_score; break; - case 4: ca = c4; cba = cb4; sa = team4_score; break; + case 1: ca = c1; cba = numbotsteam1; sa = team1_score; break; + case 2: ca = c2; cba = numbotsteam2; sa = team2_score; break; + case 3: ca = c3; cba = numbotsteam3; sa = team3_score; break; + case 4: ca = c4; cba = numbotsteam4; sa = team4_score; break; } switch(tb) { - case 1: cb = c1; cbb = cb1; sb = team1_score; break; - case 2: cb = c2; cbb = cb2; sb = team2_score; break; - case 3: cb = c3; cbb = cb3; sb = team3_score; break; - case 4: cb = c4; cbb = cb4; sb = team4_score; break; + case 1: cb = c1; cbb = numbotsteam1; sb = team1_score; break; + case 2: cb = c2; cbb = numbotsteam2; sb = team2_score; break; + case 3: cb = c3; cbb = numbotsteam3; sb = team3_score; break; + case 4: cb = c4; cbb = numbotsteam4; sb = team4_score; break; } // invalid diff --git a/qcsrc/server/teamplay.qh b/qcsrc/server/teamplay.qh index 3895bf6b6..c206f84d4 100644 --- a/qcsrc/server/teamplay.qh +++ b/qcsrc/server/teamplay.qh @@ -6,7 +6,7 @@ string cache_lastmutatormsg; // client counts for each team //float c1, c2, c3, c4; // # of bots on those teams -float cb1, cb2, cb3, cb4; +float numbotsteam1, numbotsteam2, numbotsteam3, numbotsteam4; int redowned, blueowned, yellowowned, pinkowned;