mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-21 11:21:52 +00:00
Restore stair step smoothing code for step sizes != 16
commit93e9633382
"Port step smoothing code from r1q2." ported r1q2 stair step smoothing for ranges that are equivalent to 8, 12 and 16 units/step. Later in commit7f996cc
"Don't smooth half height steps" we removed step sizes 8 and 12, because it appeared to make an elevator in hangar2 (over the water, after jump'n'run sequency) stutter. However, in reality what made them stutter was the broken comparison for velocity with an illegal cast, that we later fixed ine30f82494
"Don't cast the array itself but it's content." So now restore the smoothing for step sizes 8 and 12, which hopefully fixes bug #923, and definitely does *not* break the elevater in hangar2.
This commit is contained in:
parent
898b87f0f4
commit
690e46512e
1 changed files with 3 additions and 1 deletions
|
@ -292,10 +292,12 @@ CL_PredictMovement(void)
|
|||
VectorCopy(pm.s.origin, cl.predicted_origins[frame]);
|
||||
}
|
||||
|
||||
// step is used for movement prediction on stairs
|
||||
// (so moving up/down stairs is smooth)
|
||||
step = pm.s.origin[2] - (int)(cl.predicted_origin[2] * 8);
|
||||
VectorCopy(pm.s.velocity, tmp);
|
||||
|
||||
if (((step > 126 && step < 130))
|
||||
if (((step > 62 && step < 66) || (step > 94 && step < 98) || (step > 126 && step < 130))
|
||||
&& !VectorCompare(tmp, vec3_origin)
|
||||
&& (pm.s.pm_flags & PMF_ON_GROUND))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue