From a67c7238ec6d0e69b202542434fe00ee730a2053 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 13 Oct 2022 08:57:31 +1000 Subject: [PATCH] Make sv_gameplayfix_droptofloorstartsolid_nudgetocorrect functional again by using a QC function to move dropped items out of solid --- qcsrc/server/world.qc | 10 +++++----- qcsrc/server/world.qh | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/qcsrc/server/world.qc b/qcsrc/server/world.qc index f9e7ad16c..1cc183d04 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 48c0e38d4..ab45b176f 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; -- 2.39.2