From 40ec46e32321d58bcb31a51b0c363b3fed19a112 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 11 Dec 2022 10:55:30 +1100 Subject: [PATCH] - Duke (RR): Move `displaybowlingball()` lambda to new weapon offsets. --- source/games/duke/src/hudweapon_r.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/source/games/duke/src/hudweapon_r.cpp b/source/games/duke/src/hudweapon_r.cpp index de6575811..c595e63c9 100644 --- a/source/games/duke/src/hudweapon_r.cpp +++ b/source/games/duke/src/hudweapon_r.cpp @@ -352,17 +352,16 @@ void displayweapon_r(int snum, double interpfrac) auto displaybowlingball = [&] { - weapon_xoffset += 8; - gun_pos -= 10; + offsets.X += weapon_xoffset + 8; + offsets.Y -= gun_pos - 10; + if (p->ammo_amount[BOWLING_WEAPON]) { - hud_drawpal(weapon_xoffset + 162 - look_anghalf, - looking_arc + 214 - gun_pos + (*kb << 3), RTILE_BOWLINGBALLHUD, shade, o, pal); + hud_drawpal(162 + offsets.X, 214 + offsets.Y + (*kb << 3), RTILE_BOWLINGBALLHUD, shade, o, pal, angle); } else { - rdmyospal(weapon_xoffset + 162 - look_anghalf, - looking_arc + 214 - gun_pos, RTILE_HANDTHROW + 5, shade, o, pal); + rdmyospal(162 + offsets.X, 214 + offsets.Y, RTILE_HANDTHROW + 5, shade, o, pal, angle); } };