mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-13 07:58:04 +00:00
SW: Don't interpolate a non-remote sector object controlled
by the player. Make sure looking up/down is still smooth.
This commit is contained in:
parent
bdacab366a
commit
5baba6b9f3
2 changed files with 9 additions and 5 deletions
|
@ -2053,7 +2053,7 @@ drawscreen(PLAYERp pp)
|
||||||
tq16ang = camerapp->oq16ang + mulscale16(NORM_Q16ANGLE(camerapp->q16ang + fix16_from_int(1024) - camerapp->oq16ang) - fix16_from_int(1024), smoothratio);
|
tq16ang = camerapp->oq16ang + mulscale16(NORM_Q16ANGLE(camerapp->q16ang + fix16_from_int(1024) - camerapp->oq16ang) - fix16_from_int(1024), smoothratio);
|
||||||
tq16horiz = camerapp->oq16horiz + mulscale16(camerapp->q16horiz - camerapp->oq16horiz, smoothratio);
|
tq16horiz = camerapp->oq16horiz + mulscale16(camerapp->q16horiz - camerapp->oq16horiz, smoothratio);
|
||||||
}
|
}
|
||||||
else if (gs.InterpolateSO)
|
else if (gs.InterpolateSO && (!CommEnabled || !pp->sop_control))
|
||||||
{
|
{
|
||||||
tq16ang = camerapp->oq16ang + mulscale16(((pp->camq16ang + fix16_from_int(1024) - camerapp->oq16ang) & 0x7FFFFFF) - fix16_from_int(1024), smoothratio);
|
tq16ang = camerapp->oq16ang + mulscale16(((pp->camq16ang + fix16_from_int(1024) - camerapp->oq16ang) & 0x7FFFFFF) - fix16_from_int(1024), smoothratio);
|
||||||
tq16horiz = camerapp->oq16horiz + mulscale16(pp->camq16horiz - camerapp->oq16horiz, smoothratio);
|
tq16horiz = camerapp->oq16horiz + mulscale16(pp->camq16horiz - camerapp->oq16horiz, smoothratio);
|
||||||
|
@ -2095,7 +2095,8 @@ drawscreen(PLAYERp pp)
|
||||||
|
|
||||||
if (pp->sop_riding || pp->sop_control)
|
if (pp->sop_riding || pp->sop_control)
|
||||||
{
|
{
|
||||||
if (pp->sop_control && !gs.InterpolateSO)
|
if (pp->sop_control &&
|
||||||
|
(!gs.InterpolateSO || (CommEnabled && !pp->sop_remote)))
|
||||||
{
|
{
|
||||||
tx = pp->posx;
|
tx = pp->posx;
|
||||||
ty = pp->posy;
|
ty = pp->posy;
|
||||||
|
|
|
@ -251,9 +251,12 @@ void so_dointerpolations(int32_t smoothratio) // Stick at b
|
||||||
if (sop->xmid == INT32_MAX /*|| sop->xmid == MAXSO*/)
|
if (sop->xmid == INT32_MAX /*|| sop->xmid == MAXSO*/)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Unfortunately, interpolating over less samples doesn't
|
// Unfortunately, interpolating over less samples doesn't work well in
|
||||||
// work well in multiplayer, so conditionally disable this
|
// multiplayer. Same with sector objects controlled and carrying the player.
|
||||||
if (CommEnabled && (interp->lasttic != synctics))
|
if (CommEnabled &&
|
||||||
|
((interp->lasttic != synctics) ||
|
||||||
|
((Player[screenpeek].sop_control == sop) &&
|
||||||
|
!Player[screenpeek].sop_remote)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (i = 0, data = interp->data; i < interp->numinterpolations; i++, data++)
|
for (i = 0, data = interp->data; i < interp->numinterpolations; i++, data++)
|
||||||
|
|
Loading…
Reference in a new issue