X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fphysics%2Fplayer.qc;h=fd57e974ac8c242773500ec2edfd835655528adc;hp=f407be711134657178e65f1c957c808dd5358542;hb=3bbcff2475d1b2efc1314a358bf60c6fba6e4be6;hpb=fccc8baa9f35ff2d7ec7aa4ecab6d348a53a180e diff --git a/qcsrc/common/physics/player.qc b/qcsrc/common/physics/player.qc index f407be7111..fd57e974ac 100644 --- a/qcsrc/common/physics/player.qc +++ b/qcsrc/common/physics/player.qc @@ -314,7 +314,7 @@ bool PlayerJump(entity this) } if (!doublejump) - if (!IS_ONGROUND(this)) + if (!IS_ONGROUND(this) && !IS_ONSLICK(this)) return IS_JUMP_HELD(this); bool track_jump = PHYS_CL_TRACK_CANJUMP(this); @@ -351,7 +351,7 @@ bool PlayerJump(entity this) } } - if (!WAS_ONGROUND(this)) + if (!WAS_ONGROUND(this) && !WAS_ONSLICK(this)) { #ifdef SVQC if(autocvar_speedmeter) @@ -373,6 +373,7 @@ bool PlayerJump(entity this) this.velocity_z += mjumpheight; UNSET_ONGROUND(this); + UNSET_ONSLICK(this); SET_JUMP_HELD(this); #ifdef SVQC @@ -653,6 +654,24 @@ void PM_Footsteps(entity this) #endif } +void PM_check_slick(entity this) +{ + if(!IS_ONGROUND(this)) + return; + + if(!PHYS_SLICK_APPLYGRAVITY(this)) + return; + + tracebox(this.origin, this.mins, this.maxs, this.origin - '0 0 1', MOVE_NOMONSTERS, this); + if (trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK) + { + UNSET_ONGROUND(this); + SET_ONSLICK(this); + } + else + UNSET_ONSLICK(this); +} + void PM_check_blocked(entity this) { #ifdef SVQC