Tweaks for high speed

actorid
Jason Hooks 13 years ago
parent c4c8288af8
commit a1902b4121

@ -861,6 +861,8 @@ static void PM_WalkMove( playerMove* const pmove )
float accelerate;
float vel;
//pm->ps.gravity = 4000;
//std::cout << "Player is walking\n";
if ( pm->ps.waterlevel > 2 && //DotProduct( pml.forward, pml.groundTrace.plane.normal ) > 0 )
pml.forward.dotProduct(pml.groundTrace.planenormal) > 0.0f)
@ -1162,6 +1164,11 @@ void PM_GroundTraceMissed()
{
traceResults trace;
Ogre::Vector3 point;
//We should not have significant upwards velocity when in the air, unless we jumped.
//This code protects against flying into the air when moving at high speeds.
//Z velocity is set to 50, instead of 0, to help move up certain steps.
if(pm->ps.velocity.z > 50.0f)
pm->ps.velocity.z = 50.0f;
//std::cout << "Ground trace missed\n";
// we just transitioned into freefall
//if ( pm->debugLevel )
@ -1587,8 +1594,11 @@ void PM_AirMove()
else
PM_SlideMove ( qtrue );
#endif*/
//std::cout << "Moving in the air" << pm->ps.velocity << "\n";
/*bprintf("%i ", */PM_StepSlideMove ( true )/* )*/;
}
static void PM_NoclipMove( void )

@ -28,7 +28,7 @@ static const Ogre::Vector3 halfExtents(14.64f * 2, 14.24f * 2, 33.25f * 2);
#define MAX_CLIP_PLANES 5
#define OVERCLIP 1.001f
//#define STEPSIZE 18 // 18 is way too much
#define STEPSIZE (18 / 2)
#define STEPSIZE (13.5)
#ifndef M_PI
#define M_PI 3.14159265358979323846f
#endif

Loading…
Cancel
Save