Emit the points in the expected order.

Associating p1 with n2 and p2 with n1 was a bit confusing. Makes for a
more-sensible points output file, too.
This commit is contained in:
Bill Currie 2012-09-16 13:50:54 +09:00
parent d6476d4f93
commit 156f3382a5
1 changed files with 4 additions and 4 deletions

View File

@ -149,13 +149,13 @@ MarkLeakTrail (const portal_t *n2)
return;
VectorZero (p1);
for (i = 0; i < n2->winding->numpoints; i++)
VectorAdd (p1, n2->winding->points[i], p1);
for (i = 0; i < n1->winding->numpoints; i++)
VectorAdd (p1, n1->winding->points[i], p1);
VectorScale (p1, 1.0 / i, p1);
VectorZero (p2);
for (i = 0; i < n1->winding->numpoints; i++)
VectorAdd (p2, n1->winding->points[i], p2);
for (i = 0; i < n2->winding->numpoints; i++)
VectorAdd (p2, n2->winding->points[i], p2);
VectorScale (p2, 1.0 / i, p2);
if (!leakfile)