The 1.7 and 0.65 are just two numbers we chose after testing and tweaking the code around.
If you read the code, BUNNYJUMP_MAX_SPEED_FACTOR is used as a cap on how fast you can go. We still let you bunny hop, but instead of going uncapped like before (reaching speeds of mach 3!) we now slow you down so you can't exceed the player's maxspeed * 1.7, which is still a little high, but we thought it fit TFC since we didn't want to get rid of all the little tricks you could do with the rocket launcher and grenades. The 0.65 is how fast we slow you down, we didn't want it to feel like hitting wall once you went over the maxspeed. For reference, CS's numbers are 1.2 and 0.8. -----Original Message----- From: Brian A. Stumm [mailto:[EMAIL PROTECTED] Sent: Saturday, August 23, 2003 9:52 AM To: [EMAIL PROTECTED] Subject: [hlcoders] PM_PreventMegaBunnyJumping() Can someone explain to me the reasoning behind this code (code at bottom)? I understand this is to limit bunny hopping but why 1.7X the player max speed? Is there a reason this was not set lower? Also why the .65 speed reduction? 400 x 1.7 * 0.65 = 443 ??? I would like to further prevent bhoping and thought I would follow Valves approach only with different multipliers but wonder why Valve didn't do this originally. Was there some problem that prevented using a factor of 1.0 or 1.2 for example? Why was 1.7 chosen as the limit? [code] FROM VALVE SDK FILE: pm_shared.c #define BUNNYJUMP_MAX_SPEED_FACTOR 1.7f //-------------------------------------------------------------------------- --- // Purpose: Corrects bunny jumping ( where player initiates a bunny jump before other // movement logic runs, thus making onground == -1 thus making PM_Friction get skipped and // running PM_AirMove, which doesn't crop velocity to maxspeed like the ground / other // movement logic does. //-------------------------------------------------------------------------- --- void PM_PreventMegaBunnyJumping( void ) _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

