]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_world.qc
Merge branch 'master' into Mario/weapons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_world.qc
index c51df593f0fd0eced190c73926e0089704b2d6ca..b7c970715fe7e2e175d651bd98fc3b176911a5f6 100644 (file)
@@ -542,6 +542,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(RegisterMonsters);
        CALL_ACCUMULATED_FUNCTION(RegisterGametypes);
        CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
        CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
@@ -590,6 +591,7 @@ void spawnfunc_worldspawn (void)
 
        // needs to be done so early because of the constants they create
        CALL_ACCUMULATED_FUNCTION(RegisterWeapons);
+       CALL_ACCUMULATED_FUNCTION(RegisterMonsters);
        CALL_ACCUMULATED_FUNCTION(RegisterGametypes);
        CALL_ACCUMULATED_FUNCTION(RegisterNotifications);
        CALL_ACCUMULATED_FUNCTION(RegisterDeathtypes);
@@ -650,8 +652,6 @@ void spawnfunc_worldspawn (void)
        InitGameplayMode();
        readlevelcvars();
        GrappleHookInit();
-       ElectroInit();
-       LaserInit();
 
        player_count = 0;
        bot_waypoints_for_items = autocvar_g_waypoints_for_items;
@@ -778,6 +778,7 @@ void spawnfunc_worldspawn (void)
        addstat(STAT_SUPERWEAPONS_FINISHED, AS_FLOAT, superweapons_finished);
        addstat(STAT_PRESSED_KEYS, AS_FLOAT, pressedkeys);
        addstat(STAT_FUEL, AS_INT, ammo_fuel);
+       addstat(STAT_PLASMA, AS_INT, ammo_plasma);
        addstat(STAT_SHOTORG, AS_INT, stat_shotorg);
        addstat(STAT_LEADLIMIT, AS_FLOAT, stat_leadlimit);
        addstat(STAT_WEAPON_CLIPLOAD, AS_INT, clip_load);
@@ -787,8 +788,8 @@ void spawnfunc_worldspawn (void)
        addstat(STAT_TYPEHIT_TIME, AS_FLOAT, typehit_time);
        addstat(STAT_LAYED_MINES, AS_INT, minelayer_mines);
 
-       addstat(STAT_NEX_CHARGE, AS_FLOAT, nex_charge);
-       addstat(STAT_NEX_CHARGEPOOL, AS_FLOAT, nex_chargepool_ammo);
+       addstat(STAT_VORTEX_CHARGE, AS_FLOAT, vortex_charge);
+       addstat(STAT_VORTEX_CHARGEPOOL, AS_FLOAT, vortex_chargepool_ammo);
 
        addstat(STAT_HAGAR_LOAD, AS_INT, hagar_load);
 
@@ -802,6 +803,10 @@ void spawnfunc_worldspawn (void)
        addstat(STAT_SECRETS_TOTAL, AS_FLOAT, stat_secrets_total);
        addstat(STAT_SECRETS_FOUND, AS_FLOAT, stat_secrets_found);
 
+       // monsters
+       addstat(STAT_MONSTERS_TOTAL, AS_FLOAT, stat_monsters_total);
+       addstat(STAT_MONSTERS_KILLED, AS_FLOAT, stat_monsters_killed);
+
        // misc
        addstat(STAT_RESPAWN_TIME, AS_FLOAT, stat_respawn_time);
 
@@ -812,6 +817,7 @@ void spawnfunc_worldspawn (void)
        // set up information replies for clients and server to use
        maplist_reply = strzone(getmaplist());
        lsmaps_reply = strzone(getlsmaps());
+       monsterlist_reply = strzone(getmonsterlist());
        for(i = 0; i < 10; ++i)
        {
                s = getrecords(i);
@@ -1569,7 +1575,7 @@ float InitiateSuddenDeath()
        // - for this timelimit_overtime needs to be >0 of course
        // - also check the winning condition calculated in the previous frame and only add normal overtime
        //   again, if at the point at which timelimit would be extended again, still no winner was found
-       if (!autocvar_g_campaign && (checkrules_overtimesadded >= 0) && (checkrules_overtimesadded < autocvar_timelimit_overtimes) && autocvar_timelimit_overtime && !(g_race && !g_race_qualifying))
+       if (!autocvar_g_campaign && (checkrules_overtimesadded >= 0) && (checkrules_overtimesadded < autocvar_timelimit_overtimes || autocvar_timelimit_overtimes < 0) && autocvar_timelimit_overtime && !(g_race && !g_race_qualifying))
        {
                return 1; // need to call InitiateOvertime later
        }
@@ -2723,6 +2729,8 @@ string GotoMap(string m)
 
 void EndFrame()
 {
+       anticheat_endframe();
+
        float altime;
        FOR_EACH_REALCLIENT(self)
        {