]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_world.qc
Merge branch 'master' into Mario/vehicles
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_world.qc
index 1557fdc526b0c89e02db0674c52ad6e9332eb39b..ecc3005a335a22469769bc8c2e9668ac5b64eaa0 100644 (file)
@@ -1,13 +1,16 @@
+#include "g_world.qh"
+
+#include "../common/buffs.qh"
+
 #if defined(CSQC)
 #elif defined(MENUQC)
 #elif defined(SVQC)
-       #include "../dpdefs/progsdefs.qh"
-    #include "../dpdefs/dpextensions.qh"
     #include "../common/constants.qh"
     #include "../common/stats.qh"
     #include "../common/teams.qh"
     #include "../common/util.qh"
     #include "../common/monsters/sv_monsters.qh"
+    #include "../common/vehicles/vehicles.qh"
     #include "../common/weapons/weapons.qh"
     #include "weapons/weaponstats.qh"
     #include "autocvars.qh"
@@ -312,15 +315,21 @@ void cvar_changes_init()
                // does nothing visible
                BADCVAR("captureleadlimit_override");
                BADCVAR("g_balance_kill_delay");
+               BADCVAR("g_ca_point_limit");
                BADCVAR("g_ca_point_leadlimit");
                BADCVAR("g_ctf_captimerecord_always");
                BADCVAR("g_ctf_flag_glowtrails");
                BADCVAR("g_ctf_flag_pickup_verbosename");
                BADCVAR("g_domination_point_leadlimit");
                BADCVAR("g_forced_respawn");
+               BADCVAR("g_freezetag_point_limit");
+               BADCVAR("g_freezetag_point_leadlimit");
                BADCVAR("g_keyhunt_point_leadlimit");
                BADPREFIX("g_mod_");
+               BADCVAR("g_invasion_point_limit");
                BADCVAR("g_nexball_goalleadlimit");
+               BADCVAR("g_tdm_point_limit");
+               BADCVAR("g_tdm_point_leadlimit");
                BADCVAR("leadlimit_and_fraglimit");
                BADCVAR("leadlimit_override");
                BADCVAR("pausable");
@@ -474,7 +483,7 @@ void detect_maptype()
        vector o, v;
        float i;
 
-       for(0;;)
+       for (;;)
        {
                o = world.mins;
                o.x += random() * (world.maxs.x - world.mins.x);
@@ -550,6 +559,7 @@ void spawnfunc___init_dedicated_server(void)
 
        // needs to be done so early because of the constants they create
        CALL_ACCUMULATED_FUNCTION(RegisterWeapons);
+       CALL_ACCUMULATED_FUNCTION(RegisterVehicles);
        CALL_ACCUMULATED_FUNCTION(RegisterMonsters);
        CALL_ACCUMULATED_FUNCTION(RegisterGametypes);
        CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
@@ -598,6 +608,7 @@ void spawnfunc_worldspawn (void)
 
        // needs to be done so early because of the constants they create
        CALL_ACCUMULATED_FUNCTION(RegisterWeapons);
+       CALL_ACCUMULATED_FUNCTION(RegisterVehicles);
        CALL_ACCUMULATED_FUNCTION(RegisterMonsters);
        CALL_ACCUMULATED_FUNCTION(RegisterGametypes);
        CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
@@ -799,7 +810,7 @@ void spawnfunc_worldspawn (void)
        addstat(STAT_VORTEX_CHARGEPOOL, AS_FLOAT, vortex_chargepool_ammo);
 
        addstat(STAT_HAGAR_LOAD, AS_INT, hagar_load);
-       
+
        addstat(STAT_ARC_HEAT, AS_FLOAT, arc_heat_percent);
 
        // freeze attacks
@@ -1236,7 +1247,7 @@ float DoNextMapOverride(float reinit)
                string m;
                m = GameTypeVote_MapInfo_FixName(autocvar_nextmap);
                cvar_set("nextmap",m);
-       
+
                if(!m || gametypevote)
                        return false;
                if(autocvar_sv_vote_gametype)
@@ -1244,7 +1255,7 @@ float DoNextMapOverride(float reinit)
                        Map_Goto_SetStr(m);
                        return false;
                }
-               
+
                if(MapInfo_CheckMap(m))
                {
                        Map_Goto_SetStr(m);
@@ -1578,15 +1589,6 @@ void CheckRules_Player()
        //   (div0: and that in CheckRules_World please)
 }
 
-float checkrules_equality;
-float checkrules_suddendeathwarning;
-float checkrules_suddendeathend;
-float checkrules_overtimesadded; //how many overtimes have been already added
-
-const float WINNING_NO = 0; // no winner, but time limits may terminate the game
-const float WINNING_YES = 1; // winner found
-const float WINNING_NEVER = 2; // no winner, enter overtime if time limit is reached
-const float WINNING_STARTSUDDENDEATHOVERTIME = 3; // no winner, enter suddendeath overtime NOW
 
 float InitiateSuddenDeath()
 {