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.
This commit is contained in:
NY00123 2020-04-18 17:38:31 +03:00 committed by Christoph Oelckers
parent 5a6dd2224f
commit 63743eea67

View file

@ -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)