mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- SW: Fix DoPlayerDeathHoriz()
with unsynchronised input.
This commit is contained in:
parent
083ed3e9b7
commit
cda79496ce
2 changed files with 3 additions and 9 deletions
|
@ -1651,7 +1651,7 @@ drawscreen(PLAYERp pp, double smoothratio)
|
|||
tz = camerapp->oposz + xs_CRoundToInt(fmulscale16(camerapp->posz - camerapp->oposz, smoothratio));
|
||||
// TODO: It'd be better to check pp->input.q16angvel instead, problem is that
|
||||
// it's been repurposed for the q16ang diff while tying input to framerate
|
||||
if (cl_syncinput || (pp != Player+myconnectindex) || TEST(pp->Flags, PF_DEAD))
|
||||
if (cl_syncinput || pp != Player+myconnectindex)
|
||||
{
|
||||
tq16ang = camerapp->oq16ang + xs_CRoundToInt(fmulscale16(NORM_Q16ANGLE(camerapp->q16ang + IntToFixed(1024) - camerapp->oq16ang) - IntToFixed(1024), smoothratio));
|
||||
tq16horiz = camerapp->oq16horiz + xs_CRoundToInt(fmulscale16(camerapp->q16horiz - camerapp->oq16horiz, smoothratio));
|
||||
|
|
|
@ -6278,20 +6278,14 @@ DoPlayerBeginDie(PLAYERp pp)
|
|||
void
|
||||
DoPlayerDeathHoriz(PLAYERp pp, short target, short speed)
|
||||
{
|
||||
if (pp->q16horiz > IntToFixed(target))
|
||||
if ((pp->q16horiz - IntToFixed(target)) > FRACUNIT)
|
||||
{
|
||||
playerAddHoriz(pp, -speed);
|
||||
|
||||
if (pp->q16horiz <= IntToFixed(target))
|
||||
playerSetHoriz(pp, target);
|
||||
}
|
||||
|
||||
if (pp->q16horiz < IntToFixed(target))
|
||||
if ((IntToFixed(target) - pp->q16horiz) > FRACUNIT)
|
||||
{
|
||||
playerAddHoriz(pp, speed);
|
||||
|
||||
if (pp->q16horiz >= IntToFixed(target))
|
||||
playerSetHoriz(pp, target);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue