changes to gravity

This commit is contained in:
Bryce Hutchings 2002-07-08 04:30:19 +00:00
parent e53b32c433
commit 3e76722f5c

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.16 2002/07/08 04:30:19 niceass
// changes to gravity
//
// Revision 1.15 2002/06/16 20:06:14 jbravo
// Reindented all the source files with "indent -kr -ut -i8 -l120 -lc120 -sob -bad -bap"
//
@ -83,10 +86,11 @@ 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
PM_ClipVelocity (pm->ps->velocity, pml.groundTrace.plane.normal,
@ -230,7 +234,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) {
@ -257,8 +261,9 @@ void PM_StepSlideMove(qboolean gravity)
VectorCopy(pm->ps->origin, start_o);
VectorCopy(pm->ps->velocity, start_v);
if (PM_SlideMove(gravity) == 0)
return; // we got exactly where we wanted to go first try
PM_SlideMove(gravity);
//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);
@ -293,6 +298,7 @@ void PM_StepSlideMove(qboolean gravity)
pm->ps->velocity[2] = down_v[2];
VectorCopy(pm->ps->origin, tmp);
// NiceAss: nudge it up a little.
tmp[2] += 0.1f;
start_o[2] += 0.1f;