mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
Make parts of CutNodePortals_r() easier to read.
This commit is contained in:
parent
ab70ec2a8f
commit
538956c389
1 changed files with 5 additions and 4 deletions
|
@ -278,7 +278,7 @@ CutNodePortals_r (node_t *node)
|
||||||
|
|
||||||
// create the new portal by taking the full plane winding for the cutting
|
// create the new portal by taking the full plane winding for the cutting
|
||||||
// plane and clipping it by all of the planes from the other portals
|
// plane and clipping it by all of the planes from the other portals
|
||||||
w = BaseWindingForPlane (&planes[node->planenum]);
|
w = BaseWindingForPlane (plane);
|
||||||
side = 0;
|
side = 0;
|
||||||
for (p = node->portals; p; p = p->next[side]) {
|
for (p = node->portals; p; p = p->next[side]) {
|
||||||
clipplane = planes[p->planenum];
|
clipplane = planes[p->planenum];
|
||||||
|
@ -315,11 +315,12 @@ CutNodePortals_r (node_t *node)
|
||||||
side = 1;
|
side = 1;
|
||||||
else
|
else
|
||||||
Sys_Error ("CutNodePortals_r: mislinked portal");
|
Sys_Error ("CutNodePortals_r: mislinked portal");
|
||||||
next_portal = p->next[side];
|
|
||||||
|
|
||||||
|
next_portal = p->next[side];
|
||||||
other_node = p->nodes[!side];
|
other_node = p->nodes[!side];
|
||||||
RemovePortalFromNode (p, p->nodes[0]);
|
|
||||||
RemovePortalFromNode (p, p->nodes[1]);
|
RemovePortalFromNode (p, node);
|
||||||
|
RemovePortalFromNode (p, other_node);
|
||||||
|
|
||||||
// cut the portal into two portals, one on each side of the cut plane
|
// cut the portal into two portals, one on each side of the cut plane
|
||||||
DivideWinding (p->winding, plane, &frontwinding, &backwinding);
|
DivideWinding (p->winding, plane, &frontwinding, &backwinding);
|
||||||
|
|
Loading…
Reference in a new issue