From: Mario Date: Sat, 11 Jul 2020 03:50:41 +0000 (+1000) Subject: If sv_gameplayfix_unstickplayers is set to 2 (new default), only perform the unsticki... X-Git-Tag: xonotic-v0.8.5~887 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=dcbc6b459dba3bbbea07a82246bbdc5910eca385;p=xonotic%2Fxonotic-data.pk3dir.git If sv_gameplayfix_unstickplayers is set to 2 (new default), only perform the unsticking on clients, also apply it to the step and toss movetypes in this case, fixes glitchy stuck in wall behaviour when dying while noclipping --- diff --git a/qcsrc/common/physics/movetypes/movetypes.qc b/qcsrc/common/physics/movetypes/movetypes.qc index 7894d14fd..4d10c6f0b 100644 --- a/qcsrc/common/physics/movetypes/movetypes.qc +++ b/qcsrc/common/physics/movetypes/movetypes.qc @@ -644,17 +644,23 @@ void _Movetype_Physics_ClientFrame(entity this, float movedt) this.angles = this.angles + movedt * this.avelocity; break; case MOVETYPE_STEP: + if (GAMEPLAYFIX_UNSTICKPLAYERS(this) == 2) + _Movetype_CheckStuck(this); _Movetype_Physics_Step(this, movedt); break; case MOVETYPE_WALK: case MOVETYPE_FLY: case MOVETYPE_FLY_WORLDONLY: + if (movedt > 0 && GAMEPLAYFIX_UNSTICKPLAYERS(this) == 2) + _Movetype_CheckStuck(this); _Movetype_Physics_Walk(this, movedt); break; case MOVETYPE_TOSS: case MOVETYPE_BOUNCE: case MOVETYPE_BOUNCEMISSILE: case MOVETYPE_FLYMISSILE: + if (GAMEPLAYFIX_UNSTICKPLAYERS(this) == 2) + _Movetype_CheckStuck(this); _Movetype_Physics_Toss(this, movedt); break; case MOVETYPE_PHYSICS: diff --git a/qcsrc/common/physics/movetypes/walk.qc b/qcsrc/common/physics/movetypes/walk.qc index e0d05d7c5..cd33ebc82 100644 --- a/qcsrc/common/physics/movetypes/walk.qc +++ b/qcsrc/common/physics/movetypes/walk.qc @@ -5,7 +5,7 @@ void _Movetype_Physics_Walk(entity this, float dt) // SV_WalkMove if (dt <= 0) return; - if (GAMEPLAYFIX_UNSTICKPLAYERS(this)) + if (GAMEPLAYFIX_UNSTICKPLAYERS(this) == 1) _Movetype_CheckStuck(this); bool applygravity = (!_Movetype_CheckWater(this) && this.move_movetype == MOVETYPE_WALK && !(this.flags & FL_WATERJUMP)); diff --git a/qcsrc/common/stats.qh b/qcsrc/common/stats.qh index c77ca16be..9ecac9f7c 100644 --- a/qcsrc/common/stats.qh +++ b/qcsrc/common/stats.qh @@ -193,7 +193,7 @@ int autocvar_sv_gameplayfix_easierwaterjump = 1; int autocvar_sv_gameplayfix_stepdown = 2; float autocvar_sv_gameplayfix_stepdown_maxspeed = 0; int autocvar_sv_gameplayfix_stepmultipletimes = 1; -int autocvar_sv_gameplayfix_unstickplayers = 1; +int autocvar_sv_gameplayfix_unstickplayers = 2; int autocvar_sv_gameplayfix_fixedcheckwatertransition = 1; int autocvar_sv_gameplayfix_slidemoveprojectiles = 1; int autocvar_sv_gameplayfix_grenadebouncedownslopes = 1; diff --git a/xonotic-server.cfg b/xonotic-server.cfg index 094f17b00..ef011cffb 100644 --- a/xonotic-server.cfg +++ b/xonotic-server.cfg @@ -399,6 +399,7 @@ sv_gameplayfix_delayprojectiles 0 sv_gameplayfix_q2airaccelerate 1 sv_gameplayfix_stepmultipletimes 1 sv_gameplayfix_stepdown 2 +sv_gameplayfix_unstickplayers 2 // only available in qc physics set sv_gameplayfix_stepdown_maxspeed 0 "maximum speed walking entities can be moving for stepping down to apply - requires sv_qcphysics 1"