- Duke (RR): Move displaythrowingdynamite() lambda to new weapon offsets.

This commit is contained in:
Mitchell Richters 2022-12-11 10:36:41 +11:00 committed by Christoph Oelckers
parent 70d7210462
commit 717955d5ab

View file

@ -716,12 +716,12 @@ void displayweapon_r(int snum, double interpfrac)
auto displaythrowingdynamite = [&] auto displaythrowingdynamite = [&]
{ {
int dx; offsets.X += weapon_xoffset;
int x; offsets.Y -= gun_pos;
int dy;
dx = 25; int dx = 25;
x = 100; int dy = 20;
dy = 20;
if ((*kb) < 20) if ((*kb) < 20)
{ {
if (!(gs.displayflags & DUKE3D_NO_WIDESCREEN_PINNING)) pin = RS_ALIGN_R; if (!(gs.displayflags & DUKE3D_NO_WIDESCREEN_PINNING)) pin = RS_ALIGN_R;
@ -731,21 +731,17 @@ void displayweapon_r(int snum, double interpfrac)
{ {
if ((*kb) < 5) if ((*kb) < 5)
{ {
rdmyospal(weapon_xoffset + x + 190 - look_anghalf - dx, rdmyospal(290 + offsets.X - dx, 258 + offsets.Y - 64 + p->detonate_count - dy, RTILE_RRTILE1752, 0, o | pin, pal, angle);
looking_arc + 258 - gun_pos - 64 + p->detonate_count - dy, RTILE_RRTILE1752, 0, o | pin, pal);
} }
rdmyospal(weapon_xoffset + x + 190 - look_anghalf, rdmyospal(290 + offsets.X, 258 + offsets.Y - dy, RTILE_HANDTHROW + remote_frames[*kb], shade, o | pin, pal, angle);
looking_arc + 258 - gun_pos - dy, RTILE_HANDTHROW + remote_frames[*kb], shade, o | pin, pal);
} }
else else
{ {
if ((*kb) < 5) if ((*kb) < 5)
{ {
rdmyospal(weapon_xoffset + x + 190 - look_anghalf - dx, rdmyospal(290 + offsets.X - dx, 258 + offsets.Y - 64 + p->detonate_count - dy, RTILE_RRTILE1752, 0, o | pin, pal, angle);
looking_arc + 258 - gun_pos - 64 + p->detonate_count - dy, RTILE_RRTILE1752, 0, o | pin, pal);
} }
rdmyospal(weapon_xoffset + x + 190 - look_anghalf, rdmyospal(290 + offsets.X, 258 + offsets.Y - dy, RTILE_HANDTHROW + 1, shade, o | pin, pal, angle);
looking_arc + 258 - gun_pos - dy, RTILE_HANDTHROW + 1, shade, o | pin, pal);
} }
} }
}; };