Quake 3 style jumping


(ignition) #1

For now, jumping in ET depends on the sprint-energy. But i want to change it, to have more a Q3 style jumping. More jumping equals more speed etc. To not allow client hacks, the server keeps track of the energy etc. so i looked in bg_pmove and found this

// don't allow if player tired 
//	if (pm->pmext->sprintTime < 2500) // JPW pulled this per id request; made airborne jumpers wildly inaccurate with gunfire to compensate
//		return qfalse;
	// jpw

This piece at least shows that in static qboolean PM_CheckJump( void ) it used tol check the energy, but they moved the check somewhere else. But i couldnt find the code that is actually done when jumping.

Does anyone know?

ignition


(Lanz) #2

Search for pm->ps->jumpTime and you’ll find it (I guess) just took a quick look.


(sniser) #3

For jumping there IS no check. You can always jump, regardless of sprint-energy. The only constraint is the minimun time between jumps… so if you want more Quakeness, search for “850” (it’s in there twice I think) in bg_pmove.c and set it lower :smiley: (I think it’s the same what Lanz means)


(ignition) #4

That makes no sense…u can always jump, i know, but if u have energy it lowers when u jump…and i still need to code which is done when u jump, to increase the speed everytime u jump. but i think its done in the checkdodge function, i will keep u posted :slight_smile:

ignition


(Spark) #5

No really, you don’t jump further if you have stamina left (unless I’m mistaken…). There is also nothing preventing strafejumping in the code, only the aforementioned delay between two jumps. If you remove this check, then you can strafejump away without any limitation. :slight_smile: You just have to remove this from the beginning of PM_CheckJump:

if (pm->cmd.serverTime - pm->ps->jumpTime < 850)	// Arnout: NOTE : TEMP DEBUG
		return qfalse;

It’s really that simple. :slight_smile: