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:
parent
5979a8b4df
commit
eb4ce7b335
2 changed files with 7 additions and 28 deletions
|
@ -689,12 +689,6 @@ void PM_AirMove (void)
|
||||||
blocked = PM_StepSlideMove (true);
|
blocked = PM_StepSlideMove (true);
|
||||||
else
|
else
|
||||||
blocked = PM_SlideMove ();
|
blocked = PM_SlideMove ();
|
||||||
|
|
||||||
if (movevars.pground)
|
|
||||||
{
|
|
||||||
if (blocked & BLOCKED_FLOOR)
|
|
||||||
pmove.onground = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -725,7 +719,7 @@ void PM_CategorizePosition (void)
|
||||||
{
|
{
|
||||||
pmove.onground = false;
|
pmove.onground = false;
|
||||||
}
|
}
|
||||||
else if (!movevars.pground || pmove.onground)
|
else
|
||||||
{
|
{
|
||||||
trace = PM_PlayerTrace (pmove.origin, point);
|
trace = PM_PlayerTrace (pmove.origin, point);
|
||||||
if (trace.fraction == 1 || trace.plane.normal[2] < MIN_STEP_NORMAL)
|
if (trace.fraction == 1 || trace.plane.normal[2] < MIN_STEP_NORMAL)
|
||||||
|
@ -814,7 +808,7 @@ void PM_CategorizePosition (void)
|
||||||
}
|
}
|
||||||
#endif
|
#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
|
// snap to ground so that we can't jump higher than we're supposed to
|
||||||
if (!trace.startsolid && !trace.allsolid)
|
if (!trace.startsolid && !trace.allsolid)
|
||||||
|
@ -875,17 +869,6 @@ void PM_CheckJump (void)
|
||||||
PM_ClipVelocity (pmove.velocity, groundplane.normal, pmove.velocity, 1);
|
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.onground = false;
|
||||||
pmove.velocity[2] += 270;
|
pmove.velocity[2] += 270;
|
||||||
|
|
||||||
|
@ -1142,8 +1125,6 @@ void PM_PlayerMove (float gamespeed)
|
||||||
// set onground, watertype, and waterlevel for final spot
|
// set onground, watertype, and waterlevel for final spot
|
||||||
PM_CategorizePosition ();
|
PM_CategorizePosition ();
|
||||||
|
|
||||||
if (!movevars.pground)
|
|
||||||
{
|
|
||||||
// this is to make sure landing sound is not played twice
|
// this is to make sure landing sound is not played twice
|
||||||
// and falling damage is calculated correctly
|
// and falling damage is calculated correctly
|
||||||
if (pmove.onground && pmove.velocity[2] < -300
|
if (pmove.onground && pmove.velocity[2] < -300
|
||||||
|
@ -1151,5 +1132,4 @@ void PM_PlayerMove (float gamespeed)
|
||||||
{
|
{
|
||||||
PM_ClipVelocity (pmove.velocity, groundplane.normal, pmove.velocity, 1);
|
PM_ClipVelocity (pmove.velocity, groundplane.normal, pmove.velocity, 1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,6 @@ typedef struct {
|
||||||
int walljump;
|
int walljump;
|
||||||
qboolean slidefix;
|
qboolean slidefix;
|
||||||
qboolean airstep;
|
qboolean airstep;
|
||||||
qboolean pground;
|
|
||||||
qboolean slidyslopes;
|
qboolean slidyslopes;
|
||||||
int stepheight;
|
int stepheight;
|
||||||
} movevars_t;
|
} movevars_t;
|
||||||
|
|
Loading…
Reference in a new issue