]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_world.qc
some very WIP race code, won't compile yet, but already contains most stuff from...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_world.qc
index bc90ecac7b40630b16b0fa6c185e8d3e21c8fca9..053ed5124b134adc2d4d1837bef9b117bf1d4eb9 100644 (file)
@@ -236,6 +236,7 @@ void cvar_changes_init()
                BADCVAR("g_configversion");
                BADCVAR("g_maplist_index");
                BADCVAR("halflifebsp");
+               BADPREFIX("sv_world");
 
                // client
                BADPREFIX("cl_");
@@ -279,6 +280,8 @@ void cvar_changes_init()
                BADCVAR("sys_colortranslation");
                BADCVAR("sys_specialcharactertranslation");
                BADCVAR("timestamps");
+               BADCVAR("net_address");
+               BADCVAR("net_address_ipv6");
 
                // mapinfo
                BADCVAR("timelimit");
@@ -694,6 +697,8 @@ void spawnfunc_worldspawn (void)
        {
                records_reply[i] = strzone(getrecords(i));
        }
+       if(g_cts)
+               ladder_reply = strzone(getladder());
 
        rankings_reply = strzone(getrankings());
 
@@ -1526,16 +1531,23 @@ void InitiateOvertime() // ONLY call this if InitiateSuddenDeath returned true
 
 float GetWinningCode(float fraglimitreached, float equality)
 {
-       if(equality)
-               if(fraglimitreached)
-                       return WINNING_STARTSUDDENDEATHOVERTIME;
-               else
-                       return WINNING_NEVER;
-       else
+       if(cvar("g_campaign") == 1)
                if(fraglimitreached)
                        return WINNING_YES;
                else
                        return WINNING_NO;
+
+       else
+               if(equality)
+                       if(fraglimitreached)
+                               return WINNING_STARTSUDDENDEATHOVERTIME;
+                       else
+                               return WINNING_NEVER;
+               else
+                       if(fraglimitreached)
+                               return WINNING_YES;
+                       else
+                               return WINNING_NO;
 }
 
 // set the .winning flag for exactly those players with a given field value
@@ -1654,7 +1666,7 @@ float WinningCondition_Assault()
 
                        TeamScore_AddToTeam(assault_attacker_team, ST_ASSAULT_OBJECTIVES, 666 - TeamScore_AddToTeam(assault_attacker_team, ST_ASSAULT_OBJECTIVES, 0));
 
-                       if(ent.cnt == 1) // this was the second round
+                       if(ent.cnt == 1 || cvar("g_campaign")) // this was the second round
                        {
                                status = WINNING_YES;
                        }