Simplify the check in the inner loop
This commit is contained in:
parent
1c4c5d93ca
commit
b281c333a1
1 changed files with 2 additions and 1 deletions
|
|
@ -1618,6 +1618,7 @@ void DoomLevelMesh::CreateFlatSurface(HWFlatDispatcher& disp, MeshBuilder& state
|
|||
surf.Plane = -surf.Plane;
|
||||
|
||||
float skyZ = flatpart.ceiling ? 32768.0f : -32768.0f;
|
||||
bool useSkyZ = (drawType == LevelMeshDrawType::Portal && flatpart.plane.texture == skyflatnum);
|
||||
|
||||
for (subsector_t* sub : flatpart.section->subsectors)
|
||||
{
|
||||
|
|
@ -1633,7 +1634,7 @@ void DoomLevelMesh::CreateFlatSurface(HWFlatDispatcher& disp, MeshBuilder& state
|
|||
{
|
||||
auto& vt = sub->firstline[end - 1 - i].v1;
|
||||
|
||||
FVector3 pt((float)vt->fX(), (float)vt->fY(), (drawType == LevelMeshDrawType::Portal && flatpart.plane.texture == skyflatnum) ? skyZ : (float)plane.ZatPoint(vt));
|
||||
FVector3 pt((float)vt->fX(), (float)vt->fY(), useSkyZ ? skyZ : (float)plane.ZatPoint(vt));
|
||||
FVector4 uv = textureMatrix * FVector4(pt.X * (1.0f / 64.0f), pt.Y * (-1.0f / 64.0f), 0.0f, 1.0f);
|
||||
|
||||
FFlatVertex ffv;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue