mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
Tweaks for high speed
This commit is contained in:
parent
c4c8288af8
commit
a1902b4121
@ -861,6 +861,8 @@ static void PM_WalkMove( playerMove* const pmove )
|
|||||||
float accelerate;
|
float accelerate;
|
||||||
float vel;
|
float vel;
|
||||||
//pm->ps.gravity = 4000;
|
//pm->ps.gravity = 4000;
|
||||||
|
|
||||||
|
//std::cout << "Player is walking\n";
|
||||||
|
|
||||||
if ( pm->ps.waterlevel > 2 && //DotProduct( pml.forward, pml.groundTrace.plane.normal ) > 0 )
|
if ( pm->ps.waterlevel > 2 && //DotProduct( pml.forward, pml.groundTrace.plane.normal ) > 0 )
|
||||||
pml.forward.dotProduct(pml.groundTrace.planenormal) > 0.0f)
|
pml.forward.dotProduct(pml.groundTrace.planenormal) > 0.0f)
|
||||||
@ -1162,6 +1164,11 @@ void PM_GroundTraceMissed()
|
|||||||
{
|
{
|
||||||
traceResults trace;
|
traceResults trace;
|
||||||
Ogre::Vector3 point;
|
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";
|
//std::cout << "Ground trace missed\n";
|
||||||
// we just transitioned into freefall
|
// we just transitioned into freefall
|
||||||
//if ( pm->debugLevel )
|
//if ( pm->debugLevel )
|
||||||
@ -1587,8 +1594,11 @@ void PM_AirMove()
|
|||||||
else
|
else
|
||||||
PM_SlideMove ( qtrue );
|
PM_SlideMove ( qtrue );
|
||||||
#endif*/
|
#endif*/
|
||||||
|
//std::cout << "Moving in the air" << pm->ps.velocity << "\n";
|
||||||
|
|
||||||
/*bprintf("%i ", */PM_StepSlideMove ( true )/* )*/;
|
/*bprintf("%i ", */PM_StepSlideMove ( true )/* )*/;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PM_NoclipMove( void )
|
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 MAX_CLIP_PLANES 5
|
||||||
#define OVERCLIP 1.001f
|
#define OVERCLIP 1.001f
|
||||||
//#define STEPSIZE 18 // 18 is way too much
|
//#define STEPSIZE 18 // 18 is way too much
|
||||||
#define STEPSIZE (18 / 2)
|
#define STEPSIZE (13.5)
|
||||||
#ifndef M_PI
|
#ifndef M_PI
|
||||||
#define M_PI 3.14159265358979323846f
|
#define M_PI 3.14159265358979323846f
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user