]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/sv_main.qc
Update global stats during the match, not just at map load, fixes some issues when...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / sv_main.qc
index 54c9744332d5033ccbd5518f4f79b29dca36606c..6580e22f9662478d3b6b5b32f1a213a6efff1d5c 100644 (file)
@@ -120,7 +120,11 @@ void CreatureFrame_FallDamage(entity this)
                else
                        dm = min((dm - autocvar_g_balance_falldamage_minspeed) * autocvar_g_balance_falldamage_factor, autocvar_g_balance_falldamage_maxdamage);
                if (dm > 0)
-                       Damage (this, NULL, NULL, dm, DEATH_FALL.m_id, DMG_NOWEP, this.origin, '0 0 0');
+               {
+                       tracebox(this.origin, this.mins, this.maxs, this.origin - '0 0 1', MOVE_NOMONSTERS, this);
+                       if (!(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NODAMAGE))
+                               Damage (this, NULL, NULL, dm, DEATH_FALL.m_id, DMG_NOWEP, this.origin, '0 0 0');
+               }
        }
 
        if(autocvar_g_maxspeed > 0 && velocity_len > autocvar_g_maxspeed)
@@ -239,6 +243,7 @@ void StartFrame()
        anticheat_startframe();
        MUTATOR_CALLHOOK(SV_StartFrame);
 
+       GlobalStats_updateglobal();
     FOREACH_CLIENT(true, GlobalStats_update(it));
     IL_EACH(g_players, IS_FAKE_CLIENT(it), PlayerPostThink(it));
 }