mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 05:00:35 +00:00
Don't normalize the portal edge vectors.
This simplifies the collision handling code.
This commit is contained in:
parent
174f381125
commit
5ee552ea5b
3 changed files with 7 additions and 5 deletions
|
@ -90,10 +90,11 @@ winding_t *CopyWindingReverse (const winding_t *w);
|
|||
given winding.
|
||||
|
||||
\param w The winding to convert.
|
||||
\return The "winding" holding the unit vectors.
|
||||
\param unit If true, normalize the vectors.
|
||||
\return The "winding" holding the (unit) vectors.
|
||||
\note It is the caller's responsibiltiy to free the new winding.
|
||||
*/
|
||||
winding_t *WindingVectors (const winding_t *w);
|
||||
winding_t *WindingVectors (const winding_t *w, int unit);
|
||||
|
||||
/** Clip the winding to the plain.
|
||||
|
||||
|
|
|
@ -189,7 +189,7 @@ MOD_BuildBrushes (hull_t *hull)
|
|||
side = p->leafs[1] == leaf;
|
||||
if (p->edges)
|
||||
continue;
|
||||
p->edges = WindingVectors (p->winding);
|
||||
p->edges = WindingVectors (p->winding, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -141,7 +141,7 @@ CopyWindingReverse (const winding_t *w)
|
|||
}
|
||||
|
||||
winding_t *
|
||||
WindingVectors (const winding_t *w)
|
||||
WindingVectors (const winding_t *w, int unit)
|
||||
{
|
||||
int i;
|
||||
size_t size;
|
||||
|
@ -153,7 +153,8 @@ WindingVectors (const winding_t *w)
|
|||
for (i = 0; i < w->numpoints; i++) {
|
||||
VectorSubtract (w->points[(i + 1) % w->numpoints], w->points[i],
|
||||
c->points[i]);
|
||||
VectorNormalize (c->points[i]);
|
||||
if (unit)
|
||||
VectorNormalize (c->points[i]);
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue