mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-26 05:51:30 +00:00
- don't use a full sector backup in the triangulator for comparing changes.
Instead use a smaller struct only containing the relevant data.
This commit is contained in:
parent
fb53f32603
commit
a15e5399fa
2 changed files with 31 additions and 6 deletions
|
@ -379,11 +379,7 @@ bool SectionGeometry::ValidateSection(Section* section, int plane)
|
||||||
|
|
||||||
section->dirty &= ~EDirty::CeilingDirty;
|
section->dirty &= ~EDirty::CeilingDirty;
|
||||||
}
|
}
|
||||||
#ifdef SECTOR_HACKJOB
|
compare->copy(sec);
|
||||||
memcpy(compare, sec, sizeof(*sec));
|
|
||||||
#else
|
|
||||||
*compare = *sec;
|
|
||||||
#endif
|
|
||||||
sdata.poscompare[plane] = sec->firstWall()->pos;
|
sdata.poscompare[plane] = sec->firstWall()->pos;
|
||||||
sdata.poscompare2[plane] = sec->firstWall()->point2Wall()->pos;
|
sdata.poscompare2[plane] = sec->firstWall()->point2Wall()->pos;
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -23,12 +23,41 @@ enum GeomFlags
|
||||||
|
|
||||||
using SectionGeometryPlane = SectorGeometryPlane;
|
using SectionGeometryPlane = SectorGeometryPlane;
|
||||||
|
|
||||||
|
struct sectortypelight
|
||||||
|
{
|
||||||
|
float ceilingxpan_;
|
||||||
|
float ceilingypan_;
|
||||||
|
float floorxpan_;
|
||||||
|
float floorypan_;
|
||||||
|
|
||||||
|
ESectorFlags ceilingstat;
|
||||||
|
ESectorFlags floorstat;
|
||||||
|
int16_t ceilingpicnum;
|
||||||
|
int16_t ceilingheinum;
|
||||||
|
int16_t floorpicnum;
|
||||||
|
int16_t floorheinum;
|
||||||
|
|
||||||
|
void copy(sectortype* sec)
|
||||||
|
{
|
||||||
|
ceilingxpan_ = sec->ceilingxpan_;
|
||||||
|
ceilingypan_ = sec->ceilingypan_;
|
||||||
|
floorxpan_ = sec->floorxpan_;
|
||||||
|
floorypan_ = sec->floorypan_;
|
||||||
|
ceilingstat = sec->ceilingstat;
|
||||||
|
floorstat = sec->floorstat;
|
||||||
|
ceilingheinum = sec->ceilingheinum;
|
||||||
|
floorheinum = sec->floorheinum;
|
||||||
|
ceilingpicnum = sec->ceilingpicnum;
|
||||||
|
floorpicnum = sec->floorpicnum;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
struct SectionGeometryData
|
struct SectionGeometryData
|
||||||
{
|
{
|
||||||
SectorGeometryPlane planes[2];
|
SectorGeometryPlane planes[2];
|
||||||
TArray<FVector2> meshVertices; // flat vertices. Stored separately so that plane changes won't require completely new triangulation.
|
TArray<FVector2> meshVertices; // flat vertices. Stored separately so that plane changes won't require completely new triangulation.
|
||||||
TArray<int> meshIndices;
|
TArray<int> meshIndices;
|
||||||
sectortype compare[2] = {};
|
sectortypelight compare[2] = {};
|
||||||
vec2_t poscompare[2] = {};
|
vec2_t poscompare[2] = {};
|
||||||
vec2_t poscompare2[2] = {};
|
vec2_t poscompare2[2] = {};
|
||||||
FVector3 normal[2];
|
FVector3 normal[2];
|
||||||
|
|
Loading…
Reference in a new issue