]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_world.qc
Merge branch 'master' into TimePath/experiments/csqc_prediction
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_world.qc
index a1460ded8aa0e5bf6f19952754ba83d3213ee5be..93f7cc6408da39dabc8a1b77f56257cfe9ef0e6a 100644 (file)
@@ -420,7 +420,7 @@ void cvar_changes_init()
                BADPREFIX("sv_ready_restart_");
 
                // mutators that announce themselves properly to the server browser
-               BADCVAR("g_minstagib");
+               BADCVAR("g_instagib");
                BADCVAR("g_new_toys");
                BADCVAR("g_nix");
                BADCVAR("g_grappling_hook");
@@ -557,6 +557,7 @@ void Nagger_Init();
 void ClientInit_Spawn();
 void WeaponStats_Init();
 void WeaponStats_Shutdown();
+void Physics_AddStats();
 void spawnfunc_worldspawn (void)
 {
        float fd, l, i, j, n;
@@ -653,8 +654,6 @@ void spawnfunc_worldspawn (void)
        InitGameplayMode();
        readlevelcvars();
        GrappleHookInit();
-       ElectroInit();
-       LaserInit();
 
        player_count = 0;
        bot_waypoints_for_items = autocvar_g_waypoints_for_items;
@@ -773,7 +772,7 @@ void spawnfunc_worldspawn (void)
        addstat(STAT_SWITCHINGWEAPON, AS_INT, switchingweapon);
        addstat(STAT_GAMESTARTTIME, AS_FLOAT, stat_game_starttime);
        addstat(STAT_ROUNDSTARTTIME, AS_FLOAT, stat_round_starttime);
-       addstat(STAT_ALLOW_OLDNEXBEAM, AS_INT, stat_allow_oldnexbeam);
+       addstat(STAT_ALLOW_OLDVORTEXBEAM, AS_INT, stat_allow_oldvortexbeam);
        Nagger_Init();
 
        addstat(STAT_STRENGTH_FINISHED, AS_FLOAT, strength_finished);
@@ -781,29 +780,29 @@ 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);
        addstat(STAT_WEAPON_CLIPSIZE, AS_INT, clip_size);
        addstat(STAT_LAST_PICKUP, AS_FLOAT, last_pickup);
-       addstat(STAT_HIT_TIME, AS_FLOAT, hit_time);
+       addstat(STAT_DAMAGE_DEALT_TOTAL, AS_INT, damage_dealt_total);
        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);
+       
+       addstat(STAT_ARC_HEAT, AS_FLOAT, arc_heat_percent);
 
        // freeze attacks
        addstat(STAT_FROZEN, AS_INT, frozen);
        addstat(STAT_REVIVE_PROGRESS, AS_FLOAT, revive_progress);
 
-       // g_movementspeed hack
-       addstat(STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW, AS_FLOAT, stat_sv_airspeedlimit_nonqw);
-       addstat(STAT_MOVEVARS_MAXSPEED, AS_FLOAT, stat_sv_maxspeed);
-       addstat(STAT_MOVEVARS_AIRACCEL_QW, AS_FLOAT, stat_sv_airaccel_qw);
-       addstat(STAT_MOVEVARS_AIRSTRAFEACCEL_QW, AS_FLOAT, stat_sv_airstrafeaccel_qw);
+       // physics
+       Physics_AddStats();
 
        // secrets
        addstat(STAT_SECRETS_TOTAL, AS_FLOAT, stat_secrets_total);
@@ -2236,19 +2235,21 @@ void EndFrame()
        float altime;
        FOR_EACH_REALCLIENT(self)
        {
+               self.damage_dealt_total = 0;
+       
                if(IS_SPEC(self))
                {
                        if(self.enemy.typehitsound)
                                self.typehit_time = time;
-                       else if(self.enemy.hitsound)
-                               self.hit_time = time;
+                       else if(self.enemy.damage_dealt)
+                               self.damage_dealt_total = ceil(self.enemy.damage_dealt);
                }
                else
                {
                        if(self.typehitsound)
                                self.typehit_time = time;
-                       else if(self.hitsound)
-                               self.hit_time = time;
+                       else if(self.damage_dealt)
+                               self.damage_dealt_total = ceil(self.damage_dealt);
                }
        }
        altime = time + frametime * (1 + autocvar_g_antilag_nudge);
@@ -2259,10 +2260,12 @@ void EndFrame()
        // needed!
        FOR_EACH_CLIENT(self)
        {
-               self.hitsound = FALSE;
                self.typehitsound = FALSE;
+               self.damage_dealt = 0;
                antilag_record(self, altime);
        }
+       FOR_EACH_MONSTER(self)
+               antilag_record(self, altime);
 }