Removing strafe jumping and bunny hopping

Discuss programming in the QuakeC language.
Post Reply
Nahuel
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Removing strafe jumping and bunny hopping

Post 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!!
hi, I am nahuel, I love quake and qc.
Dr. Shadowborg
InsideQC Staff
Posts: 1120
Joined: Sat Oct 16, 2004 3:34 pm

Re: Removing strafe jumping and bunny hopping

Post 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.
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: Removing strafe jumping and bunny hopping

Post 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.
Post Reply