X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fphysics%2Fplayer.qc;h=02657dee8db2f80360d38e04cd83d917cc3d06dc;hp=5ba6e82685b3204ce2caa5da04c5862253f0c974;hb=e8f96d5f47aaced01a34dee4d590116e31838064;hpb=0d0a2025de767dbfae0519941294f5947fe38c1f diff --git a/qcsrc/common/physics/player.qc b/qcsrc/common/physics/player.qc index 5ba6e82685..02657dee8d 100644 --- a/qcsrc/common/physics/player.qc +++ b/qcsrc/common/physics/player.qc @@ -145,6 +145,9 @@ void PM_ClientMovement_UpdateStatus(entity this) do_crouch = false; } + MUTATOR_CALLHOOK(PlayerCanCrouch, this, do_crouch); + do_crouch = M_ARGV(1, bool); + if (do_crouch) { if (!IS_DUCKED(this)) { SET_DUCKED(this); @@ -687,13 +690,12 @@ void PM_check_slick(entity this) if(!IS_ONGROUND(this)) return; - if(!PHYS_SLICK_APPLYGRAVITY(this)) - return; - + trace_dphitq3surfaceflags = 0; tracebox(this.origin, this.mins, this.maxs, this.origin - '0 0 1', MOVE_NOMONSTERS, this); if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK) { - UNSET_ONGROUND(this); + if(PHYS_SLICK_APPLYGRAVITY(this)) + UNSET_ONGROUND(this); SET_ONSLICK(this); } else