From 79ae9e1f97855c515914fa8a741952d32a6ff19c Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 11 Dec 2022 10:14:21 +1100 Subject: [PATCH] - Duke (RR): Move `displaycrossbow()` lambda to new weapon offsets. --- source/games/duke/src/hudweapon_r.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/source/games/duke/src/hudweapon_r.cpp b/source/games/duke/src/hudweapon_r.cpp index 87e41f565..42654660a 100644 --- a/source/games/duke/src/hudweapon_r.cpp +++ b/source/games/duke/src/hudweapon_r.cpp @@ -397,20 +397,21 @@ void displayweapon_r(int snum, double interpfrac) { if (!(gs.displayflags & DUKE3D_NO_WIDESCREEN_PINNING)) pin = RS_ALIGN_R; static const uint8_t kb_frames[] = { 0,1,1,2,2,3,2,3,2,3,2,2,2,2,2,2,2,2,2,4,4,4,4,5,5,5,5,6,6,6,6,6,6,7,7,7,7,7,7 }; + + offsets.X += weapon_xoffset; + offsets.Y -= gun_pos; + if (kb_frames[*kb] == 2 || kb_frames[*kb] == 3) { - rdmyospal((weapon_xoffset + 200) - look_anghalf, - looking_arc + 250 - gun_pos, RTILE_RPGGUN + kb_frames[*kb], shade, o | pin, pal); + rdmyospal(200 + offsets.X, 250 + offsets.Y, RTILE_RPGGUN + kb_frames[*kb], shade, o | pin, pal, angle); } else if (kb_frames[*kb] == 1) { - rdmyospal((weapon_xoffset + 200) - look_anghalf, - looking_arc + 250 - gun_pos, RTILE_RPGGUN + kb_frames[*kb], 0, o | pin, pal); + rdmyospal(200 + offsets.X, 250 + offsets.Y, RTILE_RPGGUN + kb_frames[*kb], 0, o | pin, pal, angle); } else { - rdmyospal((weapon_xoffset + 210) - look_anghalf, - looking_arc + 255 - gun_pos, RTILE_RPGGUN + kb_frames[*kb], shade, o | pin, pal); + rdmyospal(210 + offsets.X, 255 + offsets.Y, RTILE_RPGGUN + kb_frames[*kb], shade, o | pin, pal, angle); } };