From 64e53ffc7eb113a42357bed60c80f5e0d896aabb Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 11 Dec 2022 20:01:41 +1100 Subject: [PATCH] Revert "- Duke: Invert the horizon offset in `displayweapon_d()` as it makes more sense." This reverts commit 2d2f628b950bde1ddede53e1ab51c9ba88d96592. This made sense for things such as cracking knuckles on idle as if you're looking up, the Y should drop down, however the setup of other areas such as `animateknee()` depend on the pitch being inverted like this. --- source/games/duke/src/hudweapon_d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/games/duke/src/hudweapon_d.cpp b/source/games/duke/src/hudweapon_d.cpp index ffdd00da6..73def1142 100644 --- a/source/games/duke/src/hudweapon_d.cpp +++ b/source/games/duke/src/hudweapon_d.cpp @@ -230,7 +230,7 @@ void displayweapon_d(int snum, double interpfrac) auto offsets = p->angle.weaponoffsets(interpfrac); auto horiz = !SyncInput() ? p->horizon.sum() : p->horizon.interpolatedsum(interpfrac); - auto pitchoffset = -interpolatedvalue(0., 16., horiz / DAngle90); + auto pitchoffset = interpolatedvalue(0., 16., horiz / DAngle90); auto yawinput = getavel(snum) * (1. / 16.); auto angle = p->angle.renderrotscrn(interpfrac); auto weapon_xoffset = 160 - 90 - (BobVal(512 + weapon_sway * 0.5) * (16384. / 1536.)) - 58 - p->weapon_ang;