mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-27 01:10:51 +00:00
- 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:
parent
8911805e3a
commit
e8c20f502b
2 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue