Commit 421b54a8 authored by nukeykt's avatar nukeykt Committed by Evan Ramos
Browse files

Polymost: fix transparent floor/ceiling double drawing

parent 9d549534
......@@ -5448,6 +5448,12 @@ static void polymost_drawalls(int32_t const bunch)
global_cf_xpanning = sec->floorxpanning; global_cf_ypanning = sec->floorypanning, global_cf_heinum = sec->floorheinum;
global_getzofslope_func = &fgetflorzofslope;
#ifdef YAX_ENABLE
// this is to prevent double-drawing of translucent masked floors
if (g_nodraw || r_tror_nomaskpass==0 || yax_globallev==YAX_MAXDRAWS || (sec->floorstat&256)==0 ||
yax_nomaskpass==1 || !(yax_gotsector[sectnum>>3]&pow2char[sectnum&7]))
{
#endif
if (!(globalorientation&1))
{
int32_t fz = getflorzofslope(sectnum, globalposx, globalposy);
......@@ -5802,6 +5808,16 @@ static void polymost_drawalls(int32_t const bunch)
if (!nofog)
polymost_setFogEnabled(true);
}
#ifdef YAX_ENABLE
}
else
{
g_nodraw = 1;
yax_drawcf = -1;
polymost_domost(x0, fy0, x1, fy1);
g_nodraw = 0;
}
#endif
doeditorcheck = 0;
......@@ -5846,6 +5862,12 @@ static void polymost_drawalls(int32_t const bunch)
global_cf_xpanning = sec->ceilingxpanning; global_cf_ypanning = sec->ceilingypanning, global_cf_heinum = sec->ceilingheinum;
global_getzofslope_func = &fgetceilzofslope;
#ifdef YAX_ENABLE
// this is to prevent double-drawing of translucent masked ceilings
if (g_nodraw || r_tror_nomaskpass==0 || yax_globallev==YAX_MAXDRAWS || (sec->ceilingstat&256)==0 ||
yax_nomaskpass==1 || !(yax_gotsector[sectnum>>3]&pow2char[sectnum&7]))
{
#endif
if (!(globalorientation&1))
{
int32_t cz = getceilzofslope(sectnum, globalposx, globalposy);
......@@ -6201,6 +6223,16 @@ static void polymost_drawalls(int32_t const bunch)
if (!nofog)
polymost_setFogEnabled(true);
}
#ifdef YAX_ENABLE
}
else
{
g_nodraw = 1;
yax_drawcf = -1;
polymost_domost(x1, cy1, x0, cy0);
g_nodraw = 0;
}
#endif
doeditorcheck = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment