- Duke: Back up sprite's angle in ticker and interpolate in gi->GetInput() if !SyncInput(). Sprite angle now works properly with cl_syncinput 1.

This commit is contained in:
Mitchell Richters 2021-01-04 13:27:31 +11:00
parent 8911805e3a
commit e8c20f502b
2 changed files with 5 additions and 1 deletions

View file

@ -414,6 +414,10 @@ void moveplayers(void)
int pn = act->PlayerIndex();
auto p = &ps[pn];
auto spri = &act->s;
// Back up player's sprite angle, used in DrawAutomapPlayer() when input is synchronised.
act->tempang = spri->ang;
if (act->GetOwner())
{
if (p->newOwner != nullptr) //Looking thru the camera

View file

@ -561,7 +561,7 @@ bool GameInterface::DrawAutomapPlayer(int cposx, int cposy, int czoom, int cang,
auto pspr = &act->s;
x1 = act->bposx + MulScale(pspr->x - act->bposx, smoothratio, 16) - cposx;
y1 = act->bposy + MulScale(pspr->y - act->bposy, smoothratio, 16) - cposy;
daang = (pspr->ang - cang) & 2047;
daang = ((!SyncInput() ? pspr->ang : act->tempang + MulScale(((pspr->ang + 1024 - act->tempang) & 2047) - 1024, smoothratio, 16)) - cang) & 2047;
if (p == screenpeek || ud.coop == 1)
{