This is executed by the camera, which fires a linetrace at the player constantly, and if it hits a sector instead of the player, it sets that sector's floor texture to null.
Code: Select all
FLineTraceData BehindSector;
bool hit = LineTrace(90,9000,45,TRF_THRUBLOCK,0,0,0,data: BehindSector);
if (hit && BehindSector.HitType == TRACE_HitFloor)
{
if(BehindSector.HitSector.GetTexture(sector.floor) != TexMan.CheckForTexture("null",TexMan.Type_Any))
{
textureid behindtexture;
behindtexture = BehindSector.HitSector.GetTexture(sector.floor);
BehindSector.HitSector.SetTexture(sector.floor,TexMan.CheckForTexture("null",TexMan.Type_Any));
}
}
Also if there's a way to make the lines in the sector transparent when the player stands behind them that'd be cool, but first I need to figure out the above issue.