From: Mario Date: Wed, 12 Oct 2022 22:57:31 +0000 (+1000) Subject: Make sv_gameplayfix_droptofloorstartsolid_nudgetocorrect functional again by using... X-Git-Tag: xonotic-v0.8.6~275^2~3 X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=a67c7238ec6d0e69b202542434fe00ee730a2053 Make sv_gameplayfix_droptofloorstartsolid_nudgetocorrect functional again by using a QC function to move dropped items out of solid --- diff --git a/qcsrc/server/world.qc b/qcsrc/server/world.qc index f9e7ad16cb..1cc183d048 100644 --- a/qcsrc/server/world.qc +++ b/qcsrc/server/world.qc @@ -2254,9 +2254,9 @@ void DropToFloor_Handler(entity this) vector end = this.origin - '0 0 256'; - // NOTE: NudgeOutOfSolid support is not added as Xonotic's physics do not use it! - //if(autocvar_sv_gameplayfix_droptofloorstartsolid_nudgetocorrect) - //SV_NudgeOutOfSolid(this); + // NOTE: SV_NudgeOutOfSolid is used in the engine here + if(autocvar_sv_gameplayfix_droptofloorstartsolid_nudgetocorrect) + move_out_of_solid(this); tracebox(this.origin, this.mins, this.maxs, end, MOVE_NORMAL, this); @@ -2278,8 +2278,8 @@ void DropToFloor_Handler(entity this) else if(trace_fraction < 1) { LOG_DEBUGF("DropToFloor_Handler: %v fixed badly placed entity", this.origin); - //if(autocvar_sv_gameplayfix_droptofloorstartsolid_nudgetocorrect) - //SV_NudgeOutOfSolid(this); + if(autocvar_sv_gameplayfix_droptofloorstartsolid_nudgetocorrect) + move_out_of_solid(this); setorigin(this, trace_endpos); SET_ONGROUND(this); this.groundentity = trace_ent; diff --git a/qcsrc/server/world.qh b/qcsrc/server/world.qh index 48c0e38d49..ab45b176f9 100644 --- a/qcsrc/server/world.qh +++ b/qcsrc/server/world.qh @@ -28,6 +28,7 @@ float autocvar_timelimit_overtime; int autocvar_timelimit_overtimes; float autocvar_timelimit_suddendeath; bool autocvar_sv_gameplayfix_droptofloorstartsolid; +bool autocvar_sv_gameplayfix_droptofloorstartsolid_nudgetocorrect; float checkrules_equality; float checkrules_suddendeathwarning;