From 024d4e729701d7eac5e7afdc543284d46951c179 Mon Sep 17 00:00:00 2001 From: NY00123 Date: Sun, 3 May 2020 00:20:48 +0300 Subject: [PATCH] SW: Afraid that we should disable almost all kinds of SOs in multiplayer for now, due to possible jitters. Currently leaving remote-controlled SOs. --- source/sw/src/draw.cpp | 2 +- source/sw/src/interpso.cpp | 6 ++++-- source/sw/src/track.cpp | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/source/sw/src/draw.cpp b/source/sw/src/draw.cpp index a46a49ac9..454d9e55e 100644 --- a/source/sw/src/draw.cpp +++ b/source/sw/src/draw.cpp @@ -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); tq16horiz = camerapp->oq16horiz + mulscale16(camerapp->q16horiz - camerapp->oq16horiz, smoothratio); } - else if (gs.InterpolateSO && (!CommEnabled || !pp->sop_control)) + else if (gs.InterpolateSO && !CommEnabled) { 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); diff --git a/source/sw/src/interpso.cpp b/source/sw/src/interpso.cpp index bbe0b640f..cc8616990 100644 --- a/source/sw/src/interpso.cpp +++ b/source/sw/src/interpso.cpp @@ -251,10 +251,12 @@ void so_dointerpolations(int32_t smoothratio) // Stick at b if (sop->xmid == INT32_MAX /*|| sop->xmid == MAXSO*/) continue; - // Unfortunately, interpolating over less samples doesn't work well in - // multiplayer. Same with sector objects controlled and carrying the player. + // Unfortunately, interpolating over less samples doesn't work well + // in multiplayer. We also skip any sector object not + // remotely controlled by some player. if (CommEnabled && ((interp->lasttic != synctics) || + !(sop->controller) || ((Player[screenpeek].sop_control == sop) && !Player[screenpeek].sop_remote))) continue; diff --git a/source/sw/src/track.cpp b/source/sw/src/track.cpp index ce78edbc2..eb7c869e9 100644 --- a/source/sw/src/track.cpp +++ b/source/sw/src/track.cpp @@ -1636,7 +1636,7 @@ MovePlayer(PLAYERp pp, SECTOR_OBJECTp sop, int nx, int ny) if (TEST(sop->flags, SOBJ_DONT_ROTATE)) { - if (!gs.InterpolateSO) + if (!gs.InterpolateSO || CommEnabled) { pp->oposx = pp->posx; pp->oposy = pp->posy; @@ -1686,7 +1686,7 @@ MovePlayer(PLAYERp pp, SECTOR_OBJECTp sop, int nx, int ny) pp->camq16ang = NORM_Q16ANGLE(pp->camq16ang); pp->q16ang = NORM_Q16ANGLE(pp->RevolveQ16Ang + fix16_from_int(pp->RevolveDeltaAng)); - if (!gs.InterpolateSO) + if (!gs.InterpolateSO || CommEnabled) { pp->oq16ang = pp->q16ang; pp->oposx = pp->posx; @@ -1946,7 +1946,7 @@ PlayerPart: pp->SpriteP->z = pp->loz; } } - if (!gs.InterpolateSO) + if (!gs.InterpolateSO || CommEnabled) pp->oposz = pp->posz; } else