physics back to 2.0

This commit is contained in:
Bryce Hutchings 2002-07-16 04:27:19 +00:00
parent b5c4057d74
commit fa092b6bf6
2 changed files with 13 additions and 15 deletions

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.85 2002/07/16 04:27:19 niceass
// physics back to 2.0
//
// Revision 1.84 2002/07/08 04:34:41 niceass
// oops, small mistake
//
@ -718,12 +721,10 @@ static void PM_AirMove(void)
// project moves down to flat plane
/* REMOVED. WAS IN 2.0.
pml.forward[2] = 0;
pml.right[2] = 0;
VectorNormalize(pml.forward);
VectorNormalize(pml.right);
*/
for (i = 0; i < 2; i++) {
wishvel[i] = pml.forward[i] * fmove * scale + pml.right[i] * smove * scale;
@ -745,7 +746,7 @@ static void PM_AirMove(void)
pm->ps->velocity, OVERCLIP );
}
*/
pm->ps->velocity[2] -= pm->ps->gravity * pml.frametime;
PM_StepSlideMove(qtrue);
}
@ -834,8 +835,7 @@ static void PM_WalkMove(void)
wishvel[i] = pml.forward[i] * fmove + pml.right[i] * smove;
}
// when going up or down slopes the wish velocity should Not be zero
// NiceAss: Changed from 2.0. Was commented out.
wishvel[2] = 0;
// wishvel[2] = 0;
VectorCopy(wishvel, wishdir);
wishspeed = VectorNormalize(wishdir);
@ -865,10 +865,6 @@ static void PM_WalkMove(void)
accelerate = pm_accelerate;
}
// NiceAss: Changed from 2.0. Wasn't here before.
if (pm->ps->velocity[2] < 0)
pm->ps->velocity[2] = 0;
PM_Accelerate(wishdir, wishspeed, accelerate);
if (pm->ps->velocity[2] < 0)

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.17 2002/07/16 04:27:19 niceass
// physics back to 2.0
//
// Revision 1.16 2002/07/08 04:30:19 niceass
// changes to gravity
//
@ -86,10 +89,10 @@ qboolean PM_SlideMove(qboolean gravity)
VectorCopy(pm->ps->velocity, primal_velocity);
if (gravity) {
/*VectorCopy(pm->ps->velocity, endVelocity);
VectorCopy(pm->ps->velocity, endVelocity);
endVelocity[2] -= pm->ps->gravity * pml.frametime;
pm->ps->velocity[2] = (pm->ps->velocity[2] + endVelocity[2]) * 0.5;
primal_velocity[2] = endVelocity[2];*/
primal_velocity[2] = endVelocity[2];
/*if ( pml.groundPlane ) {
// slide along the ground plane
@ -234,7 +237,7 @@ qboolean PM_SlideMove(qboolean gravity)
}
if (gravity) {
//VectorCopy(endVelocity, pm->ps->velocity);
VectorCopy(endVelocity, pm->ps->velocity);
}
// don't change velocity if in a timer (FIXME: is this correct?)
if (pm->ps->pm_time) {
@ -261,9 +264,8 @@ void PM_StepSlideMove(qboolean gravity)
VectorCopy(pm->ps->origin, start_o);
VectorCopy(pm->ps->velocity, start_v);
PM_SlideMove(gravity);
//if (PM_SlideMove(gravity) == 0)
//return; // we got exactly where we wanted to go first try
if (PM_SlideMove(gravity) == 0)
return; // we got exactly where we wanted to go first try
VectorCopy(pm->ps->origin, down_o);
VectorCopy(pm->ps->velocity, down_v);