From 22f28477e47feccda6d1891f623884e1ee4e0b3f Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Mon, 4 Jan 2021 08:49:57 +1100 Subject: [PATCH] - Duke: Revert backing up of sprite's `ang` to `tempang` from be12da6bfba8bd87332847bd1014269c8a918a7b and subsequent interpolation of sprite's ang in 21da6586170cd8bcd10621ffc8ea26eac08f3f9c and directly update the sprite's angle in `gi->GetInput()` like the other games. * Fixes #251. --- source/games/duke/src/actors.cpp | 1 - source/games/duke/src/game_misc.cpp | 2 +- source/games/duke/src/input.cpp | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index d9fc20de6..c6fcc44ce 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -5394,7 +5394,6 @@ void recordoldspritepos() ac->bposx = ac->s.x; ac->bposy = ac->s.y; ac->bposz = ac->s.z; - ac->tempang = ac->s.ang; } } } diff --git a/source/games/duke/src/game_misc.cpp b/source/games/duke/src/game_misc.cpp index ddd8e8ab4..7b16faab5 100644 --- a/source/games/duke/src/game_misc.cpp +++ b/source/games/duke/src/game_misc.cpp @@ -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 = (act->tempang + MulScale(((pspr->ang + 1024 - act->tempang) & 2047) - 1024, smoothratio, 16) - cang) & 2047; + daang = (pspr->ang - cang) & 2047; if (p == screenpeek || ud.coop == 1) { diff --git a/source/games/duke/src/input.cpp b/source/games/duke/src/input.cpp index 8f50d3079..52792ce95 100644 --- a/source/games/duke/src/input.cpp +++ b/source/games/duke/src/input.cpp @@ -847,6 +847,7 @@ void GameInterface::GetInput(InputPacket* packet, ControlInfo* const hidInput) p->angle.processhelpers(scaleAdjust); p->horizon.processhelpers(scaleAdjust); + p->GetActor()->s.ang = p->angle.ang.asbuild(); } if (packet)