mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-25 22:05:20 -04:00
reset column drawing function
Fixes #301 Short analysis: Usually, the colfunc() pointer is reset to R_DrawColumn() in R_DrawVisSprite() when the player sprites are rendered via R_DrawPSprite() in R_DrawPlayerSprites() as the last step in R_DrawMasked(). However, if you bob your 1px wide weapon sprite out of view, R_DrawPSprite() returns early and the weapon sprite's vissprite is never rendered, thus the pointer is not reset. That's why the glitch immediately disappeared when switching to a regular weapon sprite such as the Chainsaw. This also explains why the glitch never became apparent in widescreen mode. Actually, removing the TRANMAP lump or forcing to regenerate it did *not* fix the issue. It was still there but a lot less visible, since translucent textures were drawn on translucent textures which were drawn on the black void - the TRANMAP just helped to make the glitch undeniable, together with the player sprite that actually triggered it. Apparently, the case that I attempted to fix earlier, i.e. that the TRANMAP lump gets marked as purgeable after being used as a translucency table for a mid-texture, is already been taken care of in P_LoadSideDefs2().
This commit is contained in:
parent
0b7495738e
commit
9e281e7643
@ -206,10 +206,11 @@ void R_RenderMaskedSegRange(drawseg_t *ds, int x1, int x2)
|
||||
maskedtexturecol[dc_x] = D_MAXINT; // [FG] 32-bit integer math
|
||||
}
|
||||
|
||||
// [FG] reset column drawing function
|
||||
colfunc = R_DrawColumn;
|
||||
|
||||
// Except for main_tranmap, mark others purgable at this point
|
||||
if (curline->linedef->tranlump > 0 && general_translucency)
|
||||
// [FG] make sure to never mark main_tranmap as purgeable
|
||||
if (tranmap != main_tranmap)
|
||||
Z_ChangeTag(tranmap, PU_CACHE); // killough 4/11/98
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user