Fix #9: Blocks vision polys always cast shadows

This commit is contained in:
Jarrod Doyle 2024-12-26 17:39:24 +00:00
parent 2e1c90b88a
commit b41d73c0e3
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
2 changed files with 3 additions and 4 deletions

View File

@ -333,7 +333,7 @@ public class WorldRep : IChunk
public byte PortalPolyCount { get; set; }
public byte PlaneCount { get; set; }
public byte Medium { get; set; }
public byte Flags { get; set; }
public byte Flags { get; set; } // TODO: Make these a [Flags] enum
public int PortalVertices { get; set; }
public ushort NumVList { get; set; }
public byte AnimLightCount { get; set; }

View File

@ -47,8 +47,7 @@ public class MeshBuilder
// - Water surfaces
// - Door vision blockers
//
// Door vision blockers are the interesting one. They're not RenderPolys at all, and we only include
// them in the mesh if the cell only has two of them (otherwise the door is in the middle of the air)
// Door vision blockers are the interesting one. They're not RenderPolys at all, just flagged Polys.
SurfaceType primType;
if (polyIdx < solidPolys)
{
@ -58,7 +57,7 @@ public class MeshBuilder
{
primType = SurfaceType.Water;
}
else if (cell is { Flags: 24, PortalPolyCount: 2 }) // TODO: Work out what these flags are!!
else if ((cell.Flags & 8) != 0)
{
primType = SurfaceType.Solid;
}