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=c0f2fac9640be94fa6c550536f029c2197180e38;hb=62d736d8c3a51baf5fa3a4265e39a2b773704a91;hpb=7e5268799e95d0dd6f2b77ed4e097b0adc755f2b diff --git a/qcsrc/common/physics/movetypes/walk.qc b/qcsrc/common/physics/movetypes/walk.qc index c0f2fac96..5c7ae9ee2 100644 --- a/qcsrc/common/physics/movetypes/walk.qc +++ b/qcsrc/common/physics/movetypes/walk.qc @@ -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;