mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Merge branch 'znodes-offset-fix' into 'next'
UDMF: Fix offset calculation for segs that represent linedef backsides See merge request STJr/SRB2!1701
This commit is contained in:
commit
1a1cb8942c
1 changed files with 4 additions and 1 deletions
|
@ -2512,7 +2512,10 @@ static boolean P_LoadExtendedSubsectorsAndSegs(UINT8 **data, nodetype_t nodetype
|
|||
P_InitializeSeg(seg);
|
||||
seg->angle = R_PointToAngle2(v1->x, v1->y, v2->x, v2->y);
|
||||
if (seg->linedef)
|
||||
segs[i].offset = FixedHypot(v1->x - seg->linedef->v1->x, v1->y - seg->linedef->v1->y);
|
||||
{
|
||||
vertex_t *v = (seg->side == 1) ? seg->linedef->v2 : seg->linedef->v1;
|
||||
segs[i].offset = FixedHypot(v1->x - v->x, v1->y - v->y);
|
||||
}
|
||||
seg->length = P_SegLength(seg);
|
||||
#ifdef HWRENDER
|
||||
seg->flength = (rendermode == render_opengl) ? P_SegLengthFloat(seg) : 0;
|
||||
|
|
Loading…
Reference in a new issue