Reverted the buggy pground implementation.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2638 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Molgrum 2007-09-06 23:18:52 +00:00
parent 5979a8b4df
commit eb4ce7b335
2 changed files with 7 additions and 28 deletions

View File

@ -689,12 +689,6 @@ void PM_AirMove (void)
blocked = PM_StepSlideMove (true);
else
blocked = PM_SlideMove ();
if (movevars.pground)
{
if (blocked & BLOCKED_FLOOR)
pmove.onground = true;
}
}
}
@ -725,7 +719,7 @@ void PM_CategorizePosition (void)
{
pmove.onground = false;
}
else if (!movevars.pground || pmove.onground)
else
{
trace = PM_PlayerTrace (pmove.origin, point);
if (trace.fraction == 1 || trace.plane.normal[2] < MIN_STEP_NORMAL)
@ -814,7 +808,7 @@ void PM_CategorizePosition (void)
}
#endif
if (!movevars.pground && pmove.onground && pmove.pm_type != PM_FLY && pmove.waterlevel < 2)
if (pmove.onground && pmove.pm_type != PM_FLY && pmove.waterlevel < 2)
{
// snap to ground so that we can't jump higher than we're supposed to
if (!trace.startsolid && !trace.allsolid)
@ -875,17 +869,6 @@ void PM_CheckJump (void)
PM_ClipVelocity (pmove.velocity, groundplane.normal, pmove.velocity, 1);
}
if (!movevars.pground)
{
// check for jump bug
// groundplane normal was set in the call to PM_CategorizePosition
if (pmove.velocity[2] < 0 && DotProduct(pmove.velocity, groundplane.normal) < -0.1)
{
// pmove.velocity is pointing into the ground, clip it
PM_ClipVelocity (pmove.velocity, groundplane.normal, pmove.velocity, 1);
}
}
pmove.onground = false;
pmove.velocity[2] += 270;
@ -1142,14 +1125,11 @@ void PM_PlayerMove (float gamespeed)
// set onground, watertype, and waterlevel for final spot
PM_CategorizePosition ();
if (!movevars.pground)
// this is to make sure landing sound is not played twice
// and falling damage is calculated correctly
if (pmove.onground && pmove.velocity[2] < -300
&& DotProduct(pmove.velocity, groundplane.normal) < -0.1)
{
// this is to make sure landing sound is not played twice
// and falling damage is calculated correctly
if (pmove.onground && pmove.velocity[2] < -300
&& DotProduct(pmove.velocity, groundplane.normal) < -0.1)
{
PM_ClipVelocity (pmove.velocity, groundplane.normal, pmove.velocity, 1);
}
PM_ClipVelocity (pmove.velocity, groundplane.normal, pmove.velocity, 1);
}
}

View File

@ -92,7 +92,6 @@ typedef struct {
int walljump;
qboolean slidefix;
qboolean airstep;
qboolean pground;
qboolean slidyslopes;
int stepheight;
} movevars_t;