Page 1 of 1

Removing strafe jumping and bunny hopping

Posted: Sun Apr 02, 2017 5:38 am
by Nahuel
hello forum, i did search about the title above in the forum, but i just find unuseful stuff like "I LOVE STRAFE JUMPING! DO NOT REMOVE IT", or strange suggestions :P
My goal is to get a player movement similar to duke 3d, or any old school movement done in build engine.
My question is simple, i wanna a movement like quake but without strafe jumping and bunny hopping, i am using darkplaces engine.

what is the way to do this??

Any help is apreciated!!

Thanks in advance!!

Re: Removing strafe jumping and bunny hopping

Posted: Mon Apr 03, 2017 2:51 am
by Dr. Shadowborg
*Sees Bunnyhopping and Strafe Jumping mentioned and curls into a ball while swearing about Painkiller's snowy bridge and sobbing about how "people can't fly" and also that hell is constantly reloading savegames after falling to his doom* :shock:

Jokes about personal trauma aside, maybe check for (self.flags & FL_ONGROUND) with vlen(self.velocity) > (whatever max player speed you want) and if so, cap it to max player speed in PlayerPostThink? You might have to add some flag code in your damage functions too.

Re: Removing strafe jumping and bunny hopping

Posted: Mon Apr 03, 2017 6:27 am
by Spike
there's some 'sv_user.qc' file which lh ripped from the engine's code that you can throw into your mod to override how certain parts of movetype_walk work.
doing so will of course fuck over player prediction, so don't expect it to be favoured in multiplayer. DP does not provide an easy way to fix this that I'm aware of, lasy I checked even xonotic was still depending on the client's prediction logic matching whatever was going on serverside.

ultimately, the only way to actually kill bunnyhopping, is to start a timer once you land and not allow jumping until after that timer has expired. This can be predicted properly, but does require quite precise timing in order to do so. That said, arbitrary cooldowns suck.
strafe jumping can most easily be killed by removing air control. sv_aircontrol 0.
stopping ramp jumping requires you to clamp velocities just after jumping, there's no real way around that.
don't forget NQ's wall-running bug either.