X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fphysics%2Fmovetypes%2Fwalk.qc;h=c0f2fac9640be94fa6c550536f029c2197180e38;hb=780df3d4c8c05a74b64af03b46794e6cbc65fa19;hp=c20e82e8342825a9282142d288281ceffea2583d;hpb=268f9c69576b6bb929f66d19f0d077d19ba47edd;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/physics/movetypes/walk.qc b/qcsrc/common/physics/movetypes/walk.qc index c20e82e83..c0f2fac96 100644 --- a/qcsrc/common/physics/movetypes/walk.qc +++ b/qcsrc/common/physics/movetypes/walk.qc @@ -8,7 +8,7 @@ void _Movetype_Physics_Walk(entity this, float dt) // SV_WalkMove return; if (GAMEPLAYFIX_UNSTICKPLAYERS(this)) - _Movetype_UnstickEntity(this); + _Movetype_CheckStuck(this); bool applygravity = (!_Movetype_CheckWater(this) && this.move_movetype == MOVETYPE_WALK && !(this.flags & FL_WATERJUMP)); @@ -20,6 +20,14 @@ void _Movetype_Physics_Walk(entity this, float dt) // SV_WalkMove vector start_origin = this.origin; vector start_velocity = this.velocity; + if(PHYS_WALLCLIP(this) && this.pm_time) + { + if(dt >= this.pm_time || (this.flags & FL_WATERJUMP)) + this.pm_time = 0; + else + this.pm_time -= dt; + } + int clip = _Movetype_FlyMove(this, dt, applygravity, stepnormal, GAMEPLAYFIX_STEPMULTIPLETIMES(this) ? PHYS_STEPHEIGHT(this) : 0); if (GAMEPLAYFIX_DOWNTRACEONGROUND(this) && !(clip & 1)) @@ -45,6 +53,8 @@ void _Movetype_Physics_Walk(entity this, float dt) // SV_WalkMove // if the move did not hit the ground at any point, we're not on ground if (!(clip & 1)) UNSET_ONGROUND(this); + else if(PHYS_WALLCLIP(this) && !this.groundentity && (PHYS_WALLCLIP(this) == 2 || start_velocity.z < -200)) // don't do landing time if we were just going down a slope + this.pm_time = 0.25; _Movetype_CheckVelocity(this); _Movetype_LinkEdict(this, true); @@ -144,7 +154,8 @@ void _Movetype_Physics_Walk(entity this, float dt) // SV_WalkMove } // move down - vector downmove = '0 0 1' * (-PHYS_STEPHEIGHT(this) + start_velocity.z * dt); + vector downmove = '0 0 0'; + downmove.z = -PHYS_STEPHEIGHT(this) + start_velocity.z * dt; _Movetype_PushEntity(this, downmove, true); if(wasfreed(this)) return; @@ -159,6 +170,13 @@ void _Movetype_Physics_Walk(entity this, float dt) // SV_WalkMove { // this has been disabled so that you can't jump when you are stepping // up while already jumping (also known as the Quake2 double jump bug) + // LordHavoc: disabled this check so you can walk on monsters/players + //if (PRVM_serveredictfloat(ent, solid) == SOLID_BSP) + if(GAMEPLAYFIX_STEPDOWN(this) == 2) + { + SET_ONGROUND(this); + this.groundentity = trace_ent; + } } else {