Stopping Jump Boost

How can I disable the speed boost that you get when jumping?

[lua]function GM:KeyPress( ply, key )
if ply:Alive() and ply:OnGround() and ply:WaterLevel() <= 0 and key == IN_JUMP and !ply:Crouching() then
if MaxPlayers() == 1 then
ply:SetVelocity( ply:GetVelocity() + ply:GetForward() * -0.5 ) --removes the player jump forward boost, shared to make it predicted
ply:SetVelocity( ply:GetForward() * -0.1 )

Needs to be shared.

That’s much better! Does the

  • -0.5
    Half the velocity?

It sets backwards velocity of 0.5 units.

It does not seem to have a very great effect. How can I make the player hardly gain any velocity from jumping?

I’ve tried to tackle this issue and didn’t find anything I could consider satisfying. Currently I think the greatest hope for this problem is to create a new MoveType using Grea$eMonkey’s GMove.

Basically you’re trying to get movement similar to Half-Life 2 before the suit is gained or in Team Fortress 2.

It works great if it’s shared. ( Aka running both on client and server )

I used the sdk to figure out how much velocity is added during a jump, so I just set an equal backwards velocity to cancel it out. You may have to adjust the values to your liking, though.

I’ve got it in shared.lua and it seems to have some effect now that I’ve fiddled with the values. Thanks.

if MaxPlayers() == 1 then Sorry but i dont see what this is for?

It’s in the sdk, and thats how they set it up.

If MaxPlayers() == 1 it gives a really big jump boost. No idea.

Meaning the singleplayer (HL2) benefits from a different boost then the multiplayer (HL2DM).

Wow, you would have thought valve would do that better.