Forum

Jumping in QuakeWorld

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Jumping in QuakeWorld

Postby c0burn » Sat May 23, 2009 6:48 am

In QW jumping is handled server side (and checkwaterjump etc I believe)?

Is there any way to disable this QuakeC side by some clever setting of button2/onground/jumpreleased flags so it can be handled in client.qc again?

Any input appreciated
c0burn
 
Posts: 208
Joined: Fri Nov 05, 2004 12:48 pm
Location: Liverpool, England

Postby Spike » Sat May 23, 2009 8:22 am

In QuakeWorld, jumping is handled by the server-side copy of the prediction code, yes.
Jump heights are fixed at 270. Jump by a different amount and you'll break prediction. There's no way to tell the client (or server) to jump a different height.
So if you do try changing it, you'll piss off anyone that bunnyhops.

The player move code uses its own variables. It recalculates certain status flags (onground), and persists a couple of others (jump_held).
Recalculated flags would be ignored, and that jump_held flag isn't accessable to QC code at any point.

If the player's z velocity is > 180, the engine should consider the player to be off the ground, and won't apply the engine's 270 jump.
Supposedly.
Or you can do self.velocity_z = self.velocity_z + myjumpvel - 270;

But yeah, there's no way to tell the client, so it screws over any and all prediction with jumps. So use with caution.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby c0burn » Sun May 24, 2009 12:42 am

I hate you QW.

Thanks for the info Spike.
c0burn
 
Posts: 208
Joined: Fri Nov 05, 2004 12:48 pm
Location: Liverpool, England


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest