common: small tweaks: CopyWinding accepts null, document face side

This commit is contained in:
Eric Wasylishen 2021-02-05 22:26:13 -07:00
parent e44dbf9307
commit f0e2f4ba96
2 changed files with 5 additions and 1 deletions

View File

@ -223,6 +223,10 @@ polylib::BaseWindingForPlane(const vec3_t normal, const float dist)
polylib::winding_t * polylib::winding_t *
polylib::CopyWinding(const winding_t * w) polylib::CopyWinding(const winding_t * w)
{ {
if (w == nullptr) {
return nullptr;
}
int size; int size;
winding_t *c; winding_t *c;

View File

@ -402,7 +402,7 @@ typedef struct {
typedef struct { typedef struct {
int32_t planenum; int32_t planenum;
int32_t side; int32_t side; // if true, the face is on the back side of the plane
int32_t firstedge; /* we must support > 64k edges */ int32_t firstedge; /* we must support > 64k edges */
int32_t numedges; int32_t numedges;
int32_t texinfo; int32_t texinfo;