From c11737fe8016c6147c75c5b0c73be2ee49d7c1d7 Mon Sep 17 00:00:00 2001 From: Brad Harding Date: Tue, 27 Aug 2024 18:27:02 +1000 Subject: [PATCH] Further work on weapon silhouettes --- src/hu_stuff.c | 2 +- src/v_video.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 75424e6e9..f97b3c045 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -1265,7 +1265,7 @@ static void HU_DrawAltHUD(void) althudfunc(ALTHUD_RIGHT_X, ALTHUD_Y + 13, altrightpatch, WHITE, color, tinttab60); if ((patch = weaponinfo[weapon].weaponpatch)) - hudweaponfunc(ALTHUD_RIGHT_X + 108, ALTHUD_Y, patch, tinttab60); + hudweaponfunc(ALTHUD_RIGHT_X + 108, ALTHUD_Y + 10 - SHORT(patch->height) / 2, patch, tinttab60); for (int i = 1; i <= NUMCARDS; i++) for (int j = 0; j < NUMCARDS; j++) diff --git a/src/v_video.c b/src/v_video.c index 633729ce3..07223fc2d 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -1029,6 +1029,9 @@ void V_DrawHUDWeaponPatch(int x, int y, patch_t *patch, const byte *tinttab) { column_t *column = (column_t *)((byte *)patch + LONG(patch->columnoffset[col])); + if (x + width - col >= SCREENWIDTH) + continue; + // step through the posts in a column while (column->topdelta != 0xFF) { @@ -1056,6 +1059,9 @@ void V_DrawTranslucentHUDWeaponPatch(int x, int y, patch_t *patch, const byte *t { column_t *column = (column_t *)((byte *)patch + LONG(patch->columnoffset[col])); + if (x + width - col >= SCREENWIDTH) + continue; + // step through the posts in a column while (column->topdelta != 0xFF) {