mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-30 13:21:04 +00:00
SW: Interpolate the player's bob_z, based on suggestion by Striker.
Using pp instead of ppp seems to work better with prediction.
This commit is contained in:
parent
10e4c3e121
commit
d467ce3eb8
3 changed files with 4 additions and 2 deletions
|
@ -2142,7 +2142,8 @@ drawscreen(PLAYERp pp)
|
||||||
if (!TEST(pp->Flags, PF_VIEW_FROM_CAMERA|PF_VIEW_FROM_OUTSIDE))
|
if (!TEST(pp->Flags, PF_VIEW_FROM_CAMERA|PF_VIEW_FROM_OUTSIDE))
|
||||||
{
|
{
|
||||||
tz += bob_amt;
|
tz += bob_amt;
|
||||||
tz += camerapp->bob_z;
|
tz += PedanticMode ? camerapp->bob_z :
|
||||||
|
pp->obob_z + mulscale16(pp->bob_z - pp->obob_z, smoothratio);
|
||||||
|
|
||||||
// recoil only when not in camera
|
// recoil only when not in camera
|
||||||
//tq16horiz = tq16horiz + fix16_from_int(camerapp->recoil_horizoff);
|
//tq16horiz = tq16horiz + fix16_from_int(camerapp->recoil_horizoff);
|
||||||
|
|
|
@ -1205,7 +1205,7 @@ struct PLAYERstruct
|
||||||
short bob_amt;
|
short bob_amt;
|
||||||
short bob_ndx;
|
short bob_ndx;
|
||||||
short bcnt; // bob count
|
short bcnt; // bob count
|
||||||
int bob_z;
|
int bob_z, obob_z;
|
||||||
|
|
||||||
//Multiplayer variables
|
//Multiplayer variables
|
||||||
SW_PACKET input;
|
SW_PACKET input;
|
||||||
|
|
|
@ -7558,6 +7558,7 @@ MoveSkipSavePos(void)
|
||||||
pp->oposz = pp->posz;
|
pp->oposz = pp->posz;
|
||||||
pp->oq16ang = pp->q16ang;
|
pp->oq16ang = pp->q16ang;
|
||||||
pp->oq16horiz = pp->q16horiz;
|
pp->oq16horiz = pp->q16horiz;
|
||||||
|
pp->obob_z = pp->bob_z;
|
||||||
}
|
}
|
||||||
|
|
||||||
// save off stats for skip4
|
// save off stats for skip4
|
||||||
|
|
Loading…
Reference in a new issue