From 0ec334b9c0aa19c0f699c5388a5a06bdab92e9e0 Mon Sep 17 00:00:00 2001 From: Noseey Date: Mon, 13 Jan 2025 20:05:16 +0100 Subject: [PATCH] Heretic: Change comments and variable for drawing weapon base frames. --- src/heretic/r_things.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/heretic/r_things.c b/src/heretic/r_things.c index d89460340..293243c19 100644 --- a/src/heretic/r_things.c +++ b/src/heretic/r_things.c @@ -950,7 +950,7 @@ void R_DrawPSprite(pspdef_t * psp, int psyoffset, int translucent) // [crispy] y void R_DrawPlayerSprites(void) { int i, lightnum; - int tmpframe, offset, translucent = 0; // [crispy] temps for drawing translucent psrites + int tmpframe, offset, drawbase = 0; // [crispy] for drawing base frames pspdef_t *psp; // @@ -978,12 +978,12 @@ void R_DrawPlayerSprites(void) { if (psp->state) { - // [crispy] Draw offset base frame and translucent current frame + // [crispy] draw base frame for transparent or deactivated weapon flashes if (!a11y_weapon_pspr || (crispy->translucency & TRANSLUCENCY_ITEM && !(viewplayer->powers[pw_invisibility] > 4*32 || viewplayer->powers[pw_invisibility] & 8))) { - translucent = 1; + drawbase = 1; tmpframe = psp->state->frame; switch (psp->state->sprite) @@ -998,7 +998,7 @@ void R_DrawPlayerSprites(void) if (tmpframe == 3) offset = spriteoffsets[SPR_GWND_F3].offset; else - translucent = 0; + drawbase = 0; break; case SPR_BLSR: if (tmpframe == 1) @@ -1010,7 +1010,7 @@ void R_DrawPlayerSprites(void) if (tmpframe == 3) offset = spriteoffsets[SPR_BLSR_F3].offset; else - translucent = 0; + drawbase = 0; break; case SPR_HROD: if (tmpframe == 1) @@ -1022,7 +1022,7 @@ void R_DrawPlayerSprites(void) if (tmpframe == 6) offset = spriteoffsets[SPR_HROD_F6].offset; else - translucent = 0; + drawbase = 0; break; case SPR_PHNX: if (tmpframe == 1) @@ -1034,23 +1034,23 @@ void R_DrawPlayerSprites(void) if (tmpframe == 3) offset = spriteoffsets[SPR_PHNX_F3].offset; else - translucent = 0; + drawbase = 0; break; default: offset = 0x0; - translucent = 0; + drawbase = 0; break; } - if (translucent && psp->state->sprite != SPR_GAUN) + if (drawbase && psp->state->sprite != SPR_GAUN) { - psp->state->frame = 0; // draw base frame + psp->state->frame = 0; // set base frame R_DrawPSprite(psp, offset, 0); - psp->state->frame = tmpframe; // restore frame + psp->state->frame = tmpframe; // restore attack frame } } - if (!a11y_weapon_pspr && translucent) - continue; // [crispy] A11Y don't draw weapon attack frame - R_DrawPSprite(psp, 0x0, translucent); + if (!a11y_weapon_pspr && drawbase) + continue; // [crispy] A11Y no weapon flash, use base instead + R_DrawPSprite(psp, 0x0, drawbase); // [crispy] translucent when base was drawn } } }