r2013 - in branches/nexuiz-2.0/data: maps qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Dec 8 06:32:35 EST 2006
Author: div0
Date: 2006-12-08 06:32:34 -0500 (Fri, 08 Dec 2006)
New Revision: 2013
Modified:
branches/nexuiz-2.0/data/maps/bloodprison.bsp
branches/nexuiz-2.0/data/maps/compile.sh
branches/nexuiz-2.0/data/qcsrc/server/teamplay.qc
Log:
bloodprison fix; choose lowest scoring team in case of equal sizes
Modified: branches/nexuiz-2.0/data/maps/bloodprison.bsp
===================================================================
(Binary files differ)
Modified: branches/nexuiz-2.0/data/maps/compile.sh
===================================================================
--- branches/nexuiz-2.0/data/maps/compile.sh 2006-12-08 10:13:36 UTC (rev 2012)
+++ branches/nexuiz-2.0/data/maps/compile.sh 2006-12-08 11:32:34 UTC (rev 2013)
@@ -1,5 +1,14 @@
#!/bin/sh
+# this script is OBSOLETE, use nexuiz-map-compiler
+
+exit 0
+
+# nexuiz-map-compiler * -bsp -samplesize 8 -vis -light -deluxe -patchshadows -samples 3
+# nexuiz-map-compiler farewell -bsp -samplesize 8 -patchmeta -vis -light -deluxe -patchshadows -samples 3
+# nexuiz-map-compiler aggressor -scale 1.25 -bsp -samplesize 8 -vis -light -deluxe -patchshadows -samples 3
+# nexuiz-map-compiler bloodprison -scale 1.25:0.96 -bsp -samplesize 8 -vis -light -deluxe -patchshadows -samples 3
+
: ignore <<'EOF'
Nexuiz map recompilation script
Modified: branches/nexuiz-2.0/data/qcsrc/server/teamplay.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/teamplay.qc 2006-12-08 10:13:36 UTC (rev 2012)
+++ branches/nexuiz-2.0/data/qcsrc/server/teamplay.qc 2006-12-08 11:32:34 UTC (rev 2013)
@@ -595,7 +595,7 @@
// NOTE: Assumes CheckAllowedTeams has already been called!
float FindSmallestTeam(entity pl, float ignore_pl)
{
- float totalteams, smallestteam, smallestteam_count, balance_type;
+ float totalteams, smallestteam, smallestteam_count, smallestteam_score, balance_type;
totalteams = 0;
// find out what teams are available
@@ -632,7 +632,8 @@
// figure out which is smallest, giving priority to the team the player is already on as a tie-breaker
smallestteam = 0;
- smallestteam_count = 999;
+ smallestteam_count = 999999999;
+ smallestteam_score = 999999999;
// 2 gives priority to what team you're already on, 1 goes in order
// 2 doesn't seem to work though...
@@ -640,25 +641,29 @@
if(balance_type == 1)
{
- if(c1 >= 0 && c1 < smallestteam_count)
+ if(c1 >= 0 && (c1 < smallestteam_count || (c1 <= smallestteam_count && team1_score < smallestteam_score)))
{
smallestteam = 1;
smallestteam_count = c1;
+ smallestteam_score = team1_score;
}
- if(c2 >= 0 && c2 < smallestteam_count)
+ if(c2 >= 0 && (c2 < smallestteam_count || (c2 <= smallestteam_count && team2_score < smallestteam_score)))
{
smallestteam = 2;
smallestteam_count = c2;
+ smallestteam_score = team2_score;
}
- if(c3 >= 0 && c3 < smallestteam_count)
+ if(c3 >= 0 && (c3 < smallestteam_count || (c3 <= smallestteam_count && team3_score < smallestteam_score)))
{
smallestteam = 3;
smallestteam_count = c3;
+ smallestteam_score = team3_score;
}
- if(c4 >= 0 && c4 < smallestteam_count)
+ if(c4 >= 0 && (c4 < smallestteam_count || (c4 <= smallestteam_count && team4_score < smallestteam_score)))
{
smallestteam = 4;
smallestteam_count = c4;
+ smallestteam_score = team4_score;
}
}
else
@@ -706,9 +711,9 @@
if(cvar("g_domination"))
{
if(cvar("g_domination_default_teams") < 3)
- c3 = 9999;
+ c3 = 999999999;
if(cvar("g_domination_default_teams") < 4)
- c4 = 9999;
+ c4 = 999999999;
}
// if we don't care what team he ends up on, put him on whatever team he entered as.
@@ -929,7 +934,7 @@
string m;
smallestteam = 0;
- smallestteam_count = 999;
+ smallestteam_count = 999999999;
if(c1 >= 0 && c1 < smallestteam_count)
{
@@ -968,9 +973,9 @@
steam = COLOR_TEAM4;
lowest_bot = world;
- lowest_bot_score = 9999;
+ lowest_bot_score = 999999999;
lowest_player = world;
- lowest_player_score = 9999;
+ lowest_player_score = 999999999;
// find the lowest-scoring player & bot of that team
head = find(world, classname, "player");
More information about the nexuiz-commits
mailing list