X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fphysics%2Fmovetypes%2Fwalk.qc;h=5c7ae9ee2a6e2797e7c2b4db9f09d8a42e1c3548;hp=8ac2516180b55726d396d96c3512e23f811c562c;hb=62d736d8c3a51baf5fa3a4265e39a2b773704a91;hpb=74e4c6581b7e16b53d7b99c76a18f344c4b5988f diff --git a/qcsrc/common/physics/movetypes/walk.qc b/qcsrc/common/physics/movetypes/walk.qc index 8ac251618..5c7ae9ee2 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)); @@ -53,7 +53,7 @@ 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 && start_velocity.z < -200) // don't do landing time if we were just going down a slope + 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); @@ -100,10 +100,7 @@ void _Movetype_Physics_Walk(entity this, float dt) // SV_WalkMove // move up vector upmove = '0 0 1' * PHYS_STEPHEIGHT(this); - _Movetype_PushEntity(this, upmove, true); - if(wasfreed(this)) - return; - if(trace_startsolid) + if(!_Movetype_PushEntity(this, upmove, true, true)) { // we got teleported when upstepping... must abort the move return; @@ -156,11 +153,7 @@ void _Movetype_Physics_Walk(entity this, float dt) // SV_WalkMove // move down vector downmove = '0 0 0'; downmove.z = -PHYS_STEPHEIGHT(this) + start_velocity.z * dt; - _Movetype_PushEntity(this, downmove, true); - if(wasfreed(this)) - return; - - if(trace_startsolid) + if(!_Movetype_PushEntity(this, downmove, true, true)) { // we got teleported when downstepping... must abort the move return; @@ -170,6 +163,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 {