mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-22 20:21:13 +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;
|
||||
}
|
||||
#ifdef SECTOR_HACKJOB
|
||||
memcpy(compare, sec, sizeof(*sec));
|
||||
#else
|
||||
*compare = *sec;
|
||||
#endif
|
||||
compare->copy(sec);
|
||||
sdata.poscompare[plane] = sec->firstWall()->pos;
|
||||
sdata.poscompare2[plane] = sec->firstWall()->point2Wall()->pos;
|
||||
return false;
|
||||
|
|
|
@ -23,12 +23,41 @@ enum GeomFlags
|
|||
|
||||
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
|
||||
{
|
||||
SectorGeometryPlane planes[2];
|
||||
TArray<FVector2> meshVertices; // flat vertices. Stored separately so that plane changes won't require completely new triangulation.
|
||||
TArray<int> meshIndices;
|
||||
sectortype compare[2] = {};
|
||||
sectortypelight compare[2] = {};
|
||||
vec2_t poscompare[2] = {};
|
||||
vec2_t poscompare2[2] = {};
|
||||
FVector3 normal[2];
|
||||
|
|
Loading…
Reference in a new issue