mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- fixed: UpdateSegBBox only used the first seg of a linedef to calculate the linedef's bounding box.
SVN r2210 (trunk)
This commit is contained in:
parent
f24c0cf292
commit
635759ee2c
1 changed files with 10 additions and 10 deletions
|
@ -795,25 +795,25 @@ static void UpdateSegBBox (seg_t *seg)
|
|||
|
||||
line = seg->linedef;
|
||||
|
||||
if (seg->v1->x < seg->v2->x)
|
||||
if (line->v1->x < line->v2->x)
|
||||
{
|
||||
line->bbox[BOXLEFT] = seg->v1->x;
|
||||
line->bbox[BOXRIGHT] = seg->v2->x;
|
||||
line->bbox[BOXLEFT] = line->v1->x;
|
||||
line->bbox[BOXRIGHT] = line->v2->x;
|
||||
}
|
||||
else
|
||||
{
|
||||
line->bbox[BOXLEFT] = seg->v2->x;
|
||||
line->bbox[BOXRIGHT] = seg->v1->x;
|
||||
line->bbox[BOXLEFT] = line->v2->x;
|
||||
line->bbox[BOXRIGHT] = line->v1->x;
|
||||
}
|
||||
if (seg->v1->y < seg->v2->y)
|
||||
if (line->v1->y < line->v2->y)
|
||||
{
|
||||
line->bbox[BOXBOTTOM] = seg->v1->y;
|
||||
line->bbox[BOXTOP] = seg->v2->y;
|
||||
line->bbox[BOXBOTTOM] = line->v1->y;
|
||||
line->bbox[BOXTOP] = line->v2->y;
|
||||
}
|
||||
else
|
||||
{
|
||||
line->bbox[BOXBOTTOM] = seg->v2->y;
|
||||
line->bbox[BOXTOP] = seg->v1->y;
|
||||
line->bbox[BOXBOTTOM] = line->v2->y;
|
||||
line->bbox[BOXTOP] = line->v1->y;
|
||||
}
|
||||
|
||||
// Update the line's slopetype
|
||||
|
|
Loading…
Reference in a new issue