From 71f5b7d9dfd6e08616ab1a5bd41618577966f718 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Thu, 13 Oct 2022 19:53:49 +1100 Subject: [PATCH] - Duke: Move `displaytripbomb()` lambda to new weapon offsets. --- source/games/duke/src/hudweapon_d.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/source/games/duke/src/hudweapon_d.cpp b/source/games/duke/src/hudweapon_d.cpp index 85e2a751f..76a1af866 100644 --- a/source/games/duke/src/hudweapon_d.cpp +++ b/source/games/duke/src/hudweapon_d.cpp @@ -339,21 +339,16 @@ void displayweapon_d(int snum, double interpfrac) auto displaytripbomb = [&]() { - weapon_xoffset += 8; - gun_pos -= 10; + offsets.X += weapon_xoffset + 8; + offsets.Y -= gun_pos + 10; if (*kb > 6) - looking_arc += kickback_pic * 8.; + offsets.Y += kickback_pic * 8.; else if (*kb < 4) - hud_drawpal(weapon_xoffset + 142 - look_anghalf, - looking_arc + 234 - gun_pos, HANDHOLDINGLASER + 3, shade, o, pal); + hud_drawpal(142 + offsets.X, 234 + offsets.Y, HANDHOLDINGLASER + 3, shade, o, pal, angle); - hud_drawpal(weapon_xoffset + 130 - look_anghalf, - looking_arc + 249 - gun_pos, - HANDHOLDINGLASER + (*kb >> 2), shade, o, pal); - hud_drawpal(weapon_xoffset + 152 - look_anghalf, - looking_arc + 249 - gun_pos, - HANDHOLDINGLASER + (*kb >> 2), shade, o | 4, pal); + hud_drawpal(130 + offsets.X, 249 + offsets.Y, HANDHOLDINGLASER + (*kb >> 2), shade, o, pal, angle); + hud_drawpal(152 + offsets.X, 249 + offsets.Y, HANDHOLDINGLASER + (*kb >> 2), shade, o | 4, pal, angle); }; //---------------------------------------------------------------------------