Polyobject top/bottom texture + translucency

polyobjects do have top/bottom textures, silly.
And translucency.
This commit is contained in:
Sryder13 2014-08-30 14:10:55 +01:00
parent 0ee18be33b
commit 278f2e9b66
1 changed files with 13 additions and 10 deletions

View File

@ -1393,11 +1393,7 @@ static void HWR_StoreWallRange(double startfrac, double endfrac)
}
// check TOP TEXTURE
if (worldhigh < worldtop && texturetranslation[gr_sidedef->toptexture]
#ifdef POLYOBJECTS // polyobjects don't have top textures, silly.
&& !gr_curline->polyseg
#endif
)
if (worldhigh < worldtop && texturetranslation[gr_sidedef->toptexture])
{
if (drawtextured)
{
@ -1435,11 +1431,7 @@ static void HWR_StoreWallRange(double startfrac, double endfrac)
}
// check BOTTOM TEXTURE
if (worldlow > worldbottom && texturetranslation[gr_sidedef->bottomtexture]
#ifdef POLYOBJECTS // polyobjects don't have bottom textures, silly.
&& !gr_curline->polyseg
#endif
) //only if VISIBLE!!!
if (worldlow > worldbottom && texturetranslation[gr_sidedef->bottomtexture]) //only if VISIBLE!!!
{
if (drawtextured)
{
@ -1646,6 +1638,17 @@ static void HWR_StoreWallRange(double startfrac, double endfrac)
blendmode = PF_Masked;
break;
}
#ifdef POLYOBJECTS
if (gr_curline->polyseg && gr_curline->polyseg->translucency > 0)
{
if (gr_curline->polyseg->translucency >= NUMTRANSMAPS) // wall not drawn
return;
blendmode = HWR_TranstableToAlpha(gr_curline->polyseg->translucency, &Surf);
}
#endif
if (grTex->mipmap.flags & TF_TRANSPARENT)
blendmode = PF_Translucent;