mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-27 22:33:17 +00:00
- handle one particular edge case when checking if a line is completely behind a mirror.
This is not really sufficient to detect all cases where something gets incorrectly flagged as ok, but it's the easiest one to detect.
This commit is contained in:
parent
dda73b531c
commit
c4b1b96484
1 changed files with 5 additions and 2 deletions
|
@ -937,9 +937,12 @@ void GLMirrorPortal::DrawContents()
|
|||
|
||||
int GLMirrorPortal::ClipSeg(seg_t *seg)
|
||||
{
|
||||
we cannot use P_PointOnLineSide here because it loses the special meaning of 0 == 'on the line'.
|
||||
int side1 = DMulScale32(seg->v1->y - linedef->v1->y, linedef->dx, linedef->v1->x - seg->v1->x, linedef->dy);
|
||||
int side2 = DMulScale32(seg->v2->y - linedef->v1->y, linedef->dx, linedef->v1->x - seg->v2->x, linedef->dy);
|
||||
|
||||
if (side1 >= 0 && side2 >= 0)
|
||||
// this seg is completely behind the mirror.
|
||||
if (P_PointOnLineSide(seg->v1->x, seg->v1->y, linedef) &&
|
||||
P_PointOnLineSide(seg->v2->x, seg->v2->y, linedef))
|
||||
{
|
||||
return PClip_InFront;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue