X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fsv_main.qc;h=6580e22f9662478d3b6b5b32f1a213a6efff1d5c;hb=ad8173adea48a7e034a64a1696bb8bacdb16aa76;hp=cd38d61e284c0e99ab7c7548a6aae68a2eb50b88;hpb=02f502c2d57b709c7fd7cbe9776083c8ca6a6345;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/sv_main.qc b/qcsrc/server/sv_main.qc index cd38d61e2..6580e22f9 100644 --- a/qcsrc/server/sv_main.qc +++ b/qcsrc/server/sv_main.qc @@ -30,7 +30,7 @@ void CreatureFrame_hotliquids(entity this) { - if(this.dmgtime <= time) + if (this.dmgtime >= time) { return; } @@ -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)); } @@ -324,14 +329,17 @@ void SV_OnEntityPreSpawnFunction(entity this) if (this.gametypefilter != "") if (!isGametypeInFilter(MapInfo_LoadedGametype, teamplay, have_team_spawns, this.gametypefilter)) { - goto cleanup; + delete(this); + return; } if (this.cvarfilter != "" && !expr_evaluate(this.cvarfilter)) { - goto cleanup; + delete(this); + return; } if (DoesQ3ARemoveThisEntity(this)) { - goto cleanup; + delete(this); + return; } set_movetype(this, this.movetype); @@ -356,11 +364,9 @@ void SV_OnEntityPreSpawnFunction(entity this) #undef X if (MUTATOR_CALLHOOK(OnEntityPreSpawn, this)) { - goto cleanup; + delete(this); + return; } - return; -LABEL(cleanup) - delete(this); } void WarpZone_PostInitialize_Callback()