mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- avoid conversions for vertex comparisons in CollectLoops and for sectorgeometry.cpp's poscompare values.
This commit is contained in:
parent
680a87085a
commit
e3f1893e02
3 changed files with 9 additions and 9 deletions
|
@ -246,7 +246,7 @@ static void CollectLoops(TArray<loopcollect>& sectors)
|
|||
{
|
||||
// quick check for the only known cause of this in proper maps:
|
||||
// RRRA E1L3 and SW $yamato have a wall duplicate where the duplicate's index is the original's + 1. These can just be deleted here and be ignored.
|
||||
if (ww > 1 && wall[ww-1].wall_int_pos().X == wall[ww-2].wall_int_pos().X && wall[ww-1].wall_int_pos().Y == wall[ww-2].wall_int_pos().Y && wall[ww-1].point2 == wall[ww-2].point2 && wall[ww - 1].point2 == ww)
|
||||
if (ww > 1 && wall[ww-1].pos == wall[ww-2].pos && wall[ww-1].point2 == wall[ww-2].point2 && wall[ww - 1].point2 == ww)
|
||||
{
|
||||
thisloop.Clear();
|
||||
break;
|
||||
|
|
|
@ -363,8 +363,8 @@ bool SectionGeometry::ValidateSection(Section* section, int plane)
|
|||
((sec->floorstat ^ compare->floorstat) & (CSTAT_SECTOR_ALIGN | CSTAT_SECTOR_YFLIP | CSTAT_SECTOR_XFLIP | CSTAT_SECTOR_TEXHALF | CSTAT_SECTOR_SWAPXY)) == 0 &&
|
||||
sec->floorxpan_ == compare->floorxpan_ &&
|
||||
sec->floorypan_ == compare->floorypan_ &&
|
||||
sec->firstWall()->wall_int_pos() == sdata.poscompare[0] &&
|
||||
sec->firstWall()->point2Wall()->wall_int_pos() == sdata.poscompare2[0] &&
|
||||
sec->firstWall()->pos == sdata.poscompare[0] &&
|
||||
sec->firstWall()->point2Wall()->pos == sdata.poscompare2[0] &&
|
||||
!(section->dirty & EDirty::FloorDirty) && sdata.planes[plane].vertices.Size() ) return true;
|
||||
|
||||
section->dirty &= ~EDirty::FloorDirty;
|
||||
|
@ -376,15 +376,15 @@ bool SectionGeometry::ValidateSection(Section* section, int plane)
|
|||
((sec->ceilingstat ^ compare->ceilingstat) & (CSTAT_SECTOR_ALIGN | CSTAT_SECTOR_YFLIP | CSTAT_SECTOR_XFLIP | CSTAT_SECTOR_TEXHALF | CSTAT_SECTOR_SWAPXY)) == 0 &&
|
||||
sec->ceilingxpan_ == compare->ceilingxpan_ &&
|
||||
sec->ceilingypan_ == compare->ceilingypan_ &&
|
||||
sec->firstWall()->wall_int_pos() == sdata.poscompare[1] &&
|
||||
sec->firstWall()->point2Wall()->wall_int_pos() == sdata.poscompare2[1] &&
|
||||
sec->firstWall()->pos == sdata.poscompare[1] &&
|
||||
sec->firstWall()->point2Wall()->pos == sdata.poscompare2[1] &&
|
||||
!(section->dirty & EDirty::CeilingDirty) && sdata.planes[1].vertices.Size()) return true;
|
||||
|
||||
section->dirty &= ~EDirty::CeilingDirty;
|
||||
}
|
||||
compare->copy(sec);
|
||||
sdata.poscompare[plane] = sec->firstWall()->wall_int_pos();
|
||||
sdata.poscompare2[plane] = sec->firstWall()->point2Wall()->wall_int_pos();
|
||||
sdata.poscompare[plane] = sec->firstWall()->pos;
|
||||
sdata.poscompare2[plane] = sec->firstWall()->point2Wall()->pos;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -58,8 +58,8 @@ struct SectionGeometryData
|
|||
TArray<FVector2> meshVertices; // flat vertices. Stored separately so that plane changes won't require completely new triangulation.
|
||||
TArray<int> meshIndices;
|
||||
sectortypelight compare[2] = {};
|
||||
vec2_t poscompare[2] = {};
|
||||
vec2_t poscompare2[2] = {};
|
||||
DVector2 poscompare[2] = {};
|
||||
DVector2 poscompare2[2] = {};
|
||||
FVector3 normal[2];
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue