From 63743eea67d2d72407222d6804f306d9f0ce40ad Mon Sep 17 00:00:00 2001 From: NY00123 Date: Sat, 18 Apr 2020 17:38:31 +0300 Subject: [PATCH] sw/src/draw.cpp:analyzesprites: Interpolate other players' sprites, in a similar manner to what's done in Duke3D (with the addition of the angle). There seem to be some jitters with this, mostly in Master/Slave mode. Decreasing PAKRATE in mmulti.cpp might also increase the frequency of this occuring in Peer-2-Peer mode. --- source/sw/src/draw.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/sw/src/draw.cpp b/source/sw/src/draw.cpp index 435898768..b362d74c5 100644 --- a/source/sw/src/draw.cpp +++ b/source/sw/src/draw.cpp @@ -896,6 +896,14 @@ analyzesprites(int viewx, int viewy, int viewz, SWBOOL mirror) //SET(tsp->cstat, CSTAT_SPRITE_INVISIBLE); } } + else if (!PedanticMode) // Otherwise just interpolate the player sprite + { + PLAYERp pp = tu->PlayerP; + tsp->x -= mulscale16(pp->posx - pp->oposx, 65536-smoothratio); + tsp->y -= mulscale16(pp->posy - pp->oposy, 65536-smoothratio); + tsp->z -= mulscale16(pp->posz - pp->oposz, 65536-smoothratio); + tsp->ang -= fix16_to_int(mulscale16(pp->q16ang - pp->oq16ang, 65536-smoothratio)); + } } if (OverlapDraw && FAF_ConnectArea(tsp->sectnum) && tsp->owner >= 0)