|
|
|
@ -231,7 +231,7 @@ bool PM_SlideMove( bool gravity )
|
|
|
|
|
// see if we can make it there
|
|
|
|
|
//pm->trace ( &trace, pm->ps->origin, pm->mins, pm->maxs, end, pm->ps->clientNum, pm->tracemaskg);
|
|
|
|
|
//tracefunc(&trace, *(const D3DXVECTOR3* const)&(pm->ps.origin), *(const D3DXVECTOR3* const)&(end), *(const D3DXVECTOR3* const)&(pm->ps.velocity), 0, pml.traceObj);
|
|
|
|
|
newtrace(&trace, pm->ps.origin, end, halfExtents, Ogre::Math::DegreesToRadians (pm->ps.viewangles.y), pm->isInterior, pm->mEngine);
|
|
|
|
|
newtrace(&trace, pm->ps.origin, end, pm->ps.halfExtents, Ogre::Math::DegreesToRadians (pm->ps.viewangles.y), pm->isInterior, pm->mEngine);
|
|
|
|
|
|
|
|
|
|
if (trace.allsolid)
|
|
|
|
|
{
|
|
|
|
@ -449,7 +449,7 @@ int PM_StepSlideMove( bool gravity )
|
|
|
|
|
//pm->trace (&trace, start_o, pm->mins, pm->maxs, down, pm->ps->clientNum, pm->tracemask);
|
|
|
|
|
//tracefunc(&trace, start_o, down, , 0, pml.scene);
|
|
|
|
|
//tracefunc(&trace, *(const D3DXVECTOR3* const)&start_o, *(const D3DXVECTOR3* const)&down, D3DXVECTOR3(0.0f, -STEPSIZE, 0.0f), 0, pml.traceObj);
|
|
|
|
|
newtrace(&trace, down, start_o, halfExtents, Ogre::Math::DegreesToRadians(pm->ps.viewangles.y), pm->isInterior, pm->mEngine);
|
|
|
|
|
newtrace(&trace, down, start_o, pm->ps.halfExtents, Ogre::Math::DegreesToRadians(pm->ps.viewangles.y), pm->isInterior, pm->mEngine);
|
|
|
|
|
|
|
|
|
|
// up = vec3(0, 0, 1)
|
|
|
|
|
//VectorSet(up, 0, 0, 1);
|
|
|
|
@ -479,7 +479,7 @@ int PM_StepSlideMove( bool gravity )
|
|
|
|
|
// test the player position if they were a stepheight higher
|
|
|
|
|
//pm->trace (&trace, start_o, pm->mins, pm->maxs, up, pm->ps->clientNum, pm->tracemask);
|
|
|
|
|
//tracefunc(&trace, *(const D3DXVECTOR3* const)&start_o, *(const D3DXVECTOR3* const)&up, D3DXVECTOR3(0.0f, STEPSIZE, 0.0f), 0, pml.traceObj);
|
|
|
|
|
newtrace(&trace, start_o, up, halfExtents, Ogre::Math::DegreesToRadians(pm->ps.viewangles.y), pm->isInterior, pm->mEngine);
|
|
|
|
|
newtrace(&trace, start_o, up, pm->ps.halfExtents, Ogre::Math::DegreesToRadians(pm->ps.viewangles.y), pm->isInterior, pm->mEngine);
|
|
|
|
|
if ( trace.allsolid )
|
|
|
|
|
{
|
|
|
|
|
//if ( pm->debugLevel )
|
|
|
|
@ -510,7 +510,7 @@ int PM_StepSlideMove( bool gravity )
|
|
|
|
|
|
|
|
|
|
//pm->trace (&trace, pm->ps->origin, pm->mins, pm->maxs, down, pm->ps->clientNum, pm->tracemask);
|
|
|
|
|
//tracefunc(&trace, *(const D3DXVECTOR3* const)&(pm->ps.origin), *(const D3DXVECTOR3* const)&down, D3DXVECTOR3(0.0f, -STEPSIZE, 0.0f), 0, pml.traceObj);
|
|
|
|
|
newtrace(&trace, pm->ps.origin, down, halfExtents, Ogre::Math::DegreesToRadians(pm->ps.viewangles.y), pm->isInterior, pm->mEngine);
|
|
|
|
|
newtrace(&trace, pm->ps.origin, down, pm->ps.halfExtents, Ogre::Math::DegreesToRadians(pm->ps.viewangles.y), pm->isInterior, pm->mEngine);
|
|
|
|
|
if ( !trace.allsolid )
|
|
|
|
|
//VectorCopy (trace.endpos, pm->ps->origin);
|
|
|
|
|
pm->ps.origin = trace.endpos;
|
|
|
|
@ -902,7 +902,7 @@ static void PM_WalkMove( playerMove* const pmove )
|
|
|
|
|
if (pmove->hasWater )
|
|
|
|
|
{
|
|
|
|
|
const float waterHeight = pmove->waterHeight;
|
|
|
|
|
const float waterSoundStepHeight = waterHeight + halfExtents.y;
|
|
|
|
|
const float waterSoundStepHeight = waterHeight + pm->ps.halfExtents.y;
|
|
|
|
|
if (pmove->ps.origin.y < waterSoundStepHeight)
|
|
|
|
|
step_underwater = true;
|
|
|
|
|
}
|
|
|
|
@ -1182,7 +1182,7 @@ void PM_GroundTraceMissed()
|
|
|
|
|
|
|
|
|
|
//pm->trace (&trace, pm->ps->origin, pm->mins, pm->maxs, point, pm->ps->clientNum, pm->tracemask);
|
|
|
|
|
//tracefunc(&trace, *(const D3DXVECTOR3* const)&(pm->ps.origin), *(const D3DXVECTOR3* const)&point, D3DXVECTOR3(0.0f, -64.0f, 0.0f), 0, pml.traceObj);
|
|
|
|
|
newtrace(&trace, pm->ps.origin, point, halfExtents, Ogre::Math::DegreesToRadians(pm->ps.viewangles.y), pm->isInterior, pm->mEngine);
|
|
|
|
|
newtrace(&trace, pm->ps.origin, point, pm->ps.halfExtents, Ogre::Math::DegreesToRadians(pm->ps.viewangles.y), pm->isInterior, pm->mEngine);
|
|
|
|
|
//It hit the ground below
|
|
|
|
|
if ( trace.fraction < 1.0 && pm->ps.origin.z > trace.endpos.z)
|
|
|
|
|
{
|
|
|
|
@ -1228,7 +1228,7 @@ static bool PM_CorrectAllSolid(traceResults* const trace)
|
|
|
|
|
|
|
|
|
|
//pm->trace (trace, point, pm->mins, pm->maxs, point, pm->ps->clientNum, pm->tracemask);
|
|
|
|
|
//tracefunc(trace, *(const D3DXVECTOR3* const)&point, *(const D3DXVECTOR3* const)&point, D3DXVECTOR3(0.0f, 0.0f, 0.0f), 0, pml.traceObj);
|
|
|
|
|
newtrace(trace, point, point, halfExtents, Ogre::Math::DegreesToRadians(pm->ps.viewangles.y), pm->isInterior, pm->mEngine);
|
|
|
|
|
newtrace(trace, point, point, pm->ps.halfExtents, Ogre::Math::DegreesToRadians(pm->ps.viewangles.y), pm->isInterior, pm->mEngine);
|
|
|
|
|
|
|
|
|
|
if ( !trace->allsolid )
|
|
|
|
|
{
|
|
|
|
@ -1240,7 +1240,7 @@ static bool PM_CorrectAllSolid(traceResults* const trace)
|
|
|
|
|
|
|
|
|
|
//pm->trace (trace, pm->ps->origin, pm->mins, pm->maxs, point, pm->ps->clientNum, pm->tracemask);
|
|
|
|
|
//tracefunc(trace, *(const D3DXVECTOR3* const)&(pm->ps.origin), *(const D3DXVECTOR3* const)&point, D3DXVECTOR3(0.0f, -0.25f, 0.0f), 0, pml.traceObj);
|
|
|
|
|
newtrace(trace, pm->ps.origin, point, halfExtents, Ogre::Math::DegreesToRadians(pm->ps.viewangles.y), pm->isInterior, pm->mEngine);
|
|
|
|
|
newtrace(trace, pm->ps.origin, point, pm->ps.halfExtents, Ogre::Math::DegreesToRadians(pm->ps.viewangles.y), pm->isInterior, pm->mEngine);
|
|
|
|
|
pml.groundTrace = *trace;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
@ -1341,7 +1341,7 @@ static void PM_CrashLand( void )
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
const float waterHeight = pm->waterHeight;
|
|
|
|
|
const float waterHeightSplash = waterHeight + halfExtents.y;
|
|
|
|
|
const float waterHeightSplash = waterHeight + pm->ps.halfExtents.y;
|
|
|
|
|
if (pm->ps.origin.z < waterHeightSplash)
|
|
|
|
|
{
|
|
|
|
|
splashSound = true;
|
|
|
|
@ -1416,7 +1416,7 @@ static void PM_GroundTrace( void )
|
|
|
|
|
|
|
|
|
|
//pm->trace (&trace, pm->ps->origin, pm->mins, pm->maxs, point, pm->ps->clientNum, pm->tracemask);
|
|
|
|
|
//tracefunc(&trace, *(const D3DXVECTOR3* const)&(pm->ps.origin), *(const D3DXVECTOR3* const)&point, D3DXVECTOR3(0.0f, -0.25f, 0.0f), 0, pml.traceObj);
|
|
|
|
|
newtrace(&trace, pm->ps.origin, point, halfExtents, Ogre::Math::DegreesToRadians(pm->ps.viewangles.y), pm->isInterior, pm->mEngine);
|
|
|
|
|
newtrace(&trace, pm->ps.origin, point, pm->ps.halfExtents, Ogre::Math::DegreesToRadians(pm->ps.viewangles.y), pm->isInterior, pm->mEngine);
|
|
|
|
|
pml.groundTrace = trace;
|
|
|
|
|
|
|
|
|
|
// do something corrective if the trace starts in a solid...
|
|
|
|
|