]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_world.qc
Remove useless title attribute (and related attributes) from the tab class, the tab...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_world.qc
index 08681c980ce3a68746e377874ac8575eb27a6f9a..345bc5bc13b53577ce2fab6e9ec9ad72bd47df7e 100644 (file)
@@ -1,3 +1,40 @@
+#include "g_world.qh"
+
+#include "../common/buffs.qh"
+
+#if defined(CSQC)
+#elif defined(MENUQC)
+#elif defined(SVQC)
+    #include "../common/constants.qh"
+    #include "../common/stats.qh"
+    #include "../common/teams.qh"
+    #include "../common/util.qh"
+    #include "../common/monsters/sv_monsters.qh"
+    #include "../common/weapons/weapons.qh"
+    #include "weapons/weaponstats.qh"
+    #include "autocvars.qh"
+    #include "constants.qh"
+    #include "defs.qh"
+    #include "../common/notifications.qh"
+    #include "mutators/mutators_include.qh"
+    #include "campaign.qh"
+    #include "../common/mapinfo.qh"
+    #include "command/common.qh"
+    #include "command/vote.qh"
+    #include "command/getreplies.qh"
+    #include "command/sv_cmd.qh"
+    #include "anticheat.qh"
+    #include "cheats.qh"
+    #include "../common/playerstats.qh"
+    #include "g_hook.qh"
+    #include "scores.qh"
+    #include "mapvoting.qh"
+    #include "ipban.qh"
+    #include "race.qh"
+    #include "antilag.qh"
+    #include "secret.qh"
+#endif
+
 const float LATENCY_THINKRATE = 10;
 .float latency_sum;
 .float latency_cnt;
@@ -277,15 +314,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");
@@ -439,7 +482,7 @@ void detect_maptype()
        vector o, v;
        float i;
 
-       for(0;;)
+       for (;;)
        {
                o = world.mins;
                o.x += random() * (world.maxs.x - world.mins.x);
@@ -466,7 +509,7 @@ void detect_maptype()
 }
 
 entity randomseed;
-float RandomSeed_Send(entity to, float sf)
+float RandomSeed_Send(entity to, int sf)
 {
        WriteByte(MSG_ENTITY, ENT_CLIENT_RANDOMSEED);
        WriteShort(MSG_ENTITY, self.cnt);
@@ -643,7 +686,7 @@ void spawnfunc_worldspawn (void)
        // character set: ASCII 33-126 without the following characters: : ; ' " \ $
        if(autocvar_sv_eventlog)
        {
-               s = sprintf("%d.%s.%06d", ftos(autocvar_sv_eventlog_files_counter), strftime(false, "%s"), floor(random() * 1000000));
+               s = sprintf("%d.%s.%06d", itos(autocvar_sv_eventlog_files_counter), strftime(false, "%s"), floor(random() * 1000000));
                matchid = strzone(s);
 
                GameLogEcho(strcat(":gamestart:", GetGametype(), "_", GetMapname(), ":", s));
@@ -764,7 +807,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
@@ -1201,7 +1244,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)
@@ -1209,7 +1252,7 @@ float DoNextMapOverride(float reinit)
                        Map_Goto_SetStr(m);
                        return false;
                }
-               
+
                if(MapInfo_CheckMap(m))
                {
                        Map_Goto_SetStr(m);
@@ -1543,15 +1586,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()
 {
@@ -1930,7 +1964,7 @@ float WinningCondition_RanOutOfSpawns()
        if(have_team_spawns <= 0)
                return WINNING_NO;
 
-       if(autocvar_g_spawn_useallspawns <= 0)
+       if(!autocvar_g_spawn_useallspawns)
                return WINNING_NO;
 
        if(!some_spawn_has_been_used)