mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 11:40:44 +00:00
- fixed interpolation issues with sector objects in SW.
SO's vertex interpolation does not use the common framework so it got missed by the sector retriangulation checks. We need to check two wall positions as well to make sure that sector movement is properly detected.
This commit is contained in:
parent
389d61d086
commit
e0fe8d2ed9
3 changed files with 8 additions and 0 deletions
|
@ -18,6 +18,7 @@ struct vec2_t
|
|||
vec2_t operator-(const vec2_t& other) const { return { x - other.x, y - other.y }; }
|
||||
vec2_t& operator+=(const vec2_t& other) { x += other.x; y += other.y; return *this; };
|
||||
vec2_t& operator-=(const vec2_t& other) { x -= other.x; y -= other.y; return *this; };
|
||||
bool operator == (const vec2_t& other) const { return x == other.x && y == other.y; };
|
||||
};
|
||||
|
||||
struct vec3_t
|
||||
|
|
|
@ -304,6 +304,8 @@ void SectorGeometry::ValidateSector(unsigned int secnum, int plane)
|
|||
sec->floorxpan_ == compare->floorxpan_ &&
|
||||
sec->floorypan_ == compare->floorypan_ &&
|
||||
sec->floorz == compare->floorz &&
|
||||
wall[sec->wallptr].pos == data[secnum].poscompare &&
|
||||
wall[wall[sec->wallptr].point2].pos == data[secnum].poscompare &&
|
||||
!(sec->dirty & 1) && data[secnum].planes[plane].vertices.Size() ) return;
|
||||
|
||||
sec->dirty &= ~1;
|
||||
|
@ -316,10 +318,13 @@ void SectorGeometry::ValidateSector(unsigned int secnum, int plane)
|
|||
sec->ceilingxpan_ == compare->ceilingxpan_ &&
|
||||
sec->ceilingypan_ == compare->ceilingypan_ &&
|
||||
sec->ceilingz == compare->ceilingz &&
|
||||
wall[wall[sec->wallptr].point2].pos == data[secnum].poscompare &&
|
||||
!(sec->dirty & 2) && data[secnum].planes[plane].vertices.Size()) return;
|
||||
|
||||
sec->dirty &= ~2;
|
||||
}
|
||||
*compare = *sec;
|
||||
data[secnum].poscompare == wall[sec->wallptr].pos;
|
||||
data[secnum].poscompare2 == wall[wall[sec->wallptr].point2].pos;
|
||||
MakeVertices(secnum, plane);
|
||||
}
|
||||
|
|
|
@ -15,6 +15,8 @@ struct SectorGeometryData
|
|||
{
|
||||
SectorGeometryPlane planes[2];
|
||||
sectortype compare{};
|
||||
vec2_t poscompare{ };
|
||||
vec2_t poscompare2{ };
|
||||
};
|
||||
|
||||
class SectorGeometry
|
||||
|
|
Loading…
Reference in a new issue