]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Mario/movetype_push
authorMario <mario.mario@y7mail.com>
Sat, 11 Jul 2020 03:52:07 +0000 (13:52 +1000)
committerMario <mario.mario@y7mail.com>
Sat, 11 Jul 2020 03:52:07 +0000 (13:52 +1000)
qcsrc/common/physics/movetypes/movetypes.qc
qcsrc/common/physics/movetypes/walk.qc
qcsrc/common/stats.qh
qcsrc/common/weapons/weapon.qh
xonotic-server.cfg

index 5b7bb11b870e33b2acb102ca6f5763d58fe7b920..28af884dea59850713e39e202f6d149153f79c1d 100644 (file)
@@ -723,17 +723,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:
index e0d05d7c557c9ab112bb2e5c0d704a619d5a082c..cd33ebc826fc347efd83037ece2fcd20f2c94bd5 100644 (file)
@@ -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));
index c77ca16be2a432043f0d8808fa1506b25b0d3a7d..9ecac9f7c0bdd0bf2ee59dad460c6beea9905fc0 100644 (file)
@@ -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;
index 02fbdb536c283c669714f2ac754df048f3bacd9f..38134fa3d68cb66bef6ed9ef5a111b07ce5a88f7 100644 (file)
@@ -129,10 +129,19 @@ void weapon_defaultspawnfunc(entity this, Weapon e);
 #define SPAWNFUNC_WEAPON(name, weapon) \
     spawnfunc(name) { weapon_defaultspawnfunc(this, weapon); }
 
+#define SPAWNFUNC_WEAPON_COND(name, cond, wep1, wep2) \
+    spawnfunc(name) \
+    { \
+        entity wep = (cond) ? wep1 : wep2; \
+        weapon_defaultspawnfunc(this, wep); \
+    }
+
 #else
 
 #define SPAWNFUNC_WEAPON(name, weapon)
 
+#define SPAWNFUNC_WEAPON_COND(name, weapon)
+
 #endif
 
 #include <common/items/_mod.qh>
index 094f17b0068ff98552cd64226931b121e0ed01f3..ef011cffbc8784866086a3c37dcfef140fba4219 100644 (file)
@@ -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"