]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make sv_gameplayfix_droptofloorstartsolid_nudgetocorrect functional again by using...
authorMario <mario.mario@y7mail.com>
Wed, 12 Oct 2022 22:57:31 +0000 (08:57 +1000)
committerMario <mario.mario@y7mail.com>
Wed, 12 Oct 2022 22:57:31 +0000 (08:57 +1000)
qcsrc/server/world.qc
qcsrc/server/world.qh

index f9e7ad16cb9f3a1ec8a15c25826eb1ecff88ecc0..1cc183d04828d354a7ad19ad69c6479be25a8645 100644 (file)
@@ -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;
index 48c0e38d4966bc0232567f2b1f3b3ed6bf766775..ab45b176f972af7aeb76b187ece6ffc9f067e8b1 100644 (file)
@@ -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;