X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=tools%2Fquake3%2Fq3map2%2Fportals.c;h=9b6ec05703e48a299e364562144bb4e7bd10be42;hb=37787ff58d17054395ece7e19db0bd07dde08fc6;hp=de00fe80ba76d2e6b0d09ba81fc6e3d65843db45;hpb=a288b9c4361aac242f3218e635f1ed73d070c146;p=xonotic%2Fnetradiant.git diff --git a/tools/quake3/q3map2/portals.c b/tools/quake3/q3map2/portals.c index de00fe80..9b6ec057 100644 --- a/tools/quake3/q3map2/portals.c +++ b/tools/quake3/q3map2/portals.c @@ -409,8 +409,9 @@ void SplitNodePortals( node_t *node ){ // // cut the portal into two portals, one on each side of the cut plane // + /* not strict, we want to always keep one of them even if coplanar */ ClipWindingEpsilon( p->winding, plane->normal, plane->dist, - SPLIT_WINDING_EPSILON, &frontwinding, &backwinding ); /* not strict, we want to always keep one of them even if coplanar */ + SPLIT_WINDING_EPSILON, &frontwinding, &backwinding ); if ( frontwinding && WindingIsTiny( frontwinding ) ) { if ( !f->tinyportals ) { @@ -664,11 +665,11 @@ qboolean PlaceOccupant( node_t *headnode, vec3_t origin, entity_t *occupant, qbo int FloodEntities( tree_t *tree ){ int i, s; vec3_t origin, offset, scale, angles; - qboolean r, inside, skybox; + qboolean r, inside, skybox, found; node_t *headnode; entity_t *e, *tripped; const char *value; - int tripcount; + int tripcount = 0; headnode = tree->headnode; @@ -676,7 +677,7 @@ int FloodEntities( tree_t *tree ){ inside = qfalse; tree->outside_node.occupied = 0; - tripped = qfalse; + tripped = NULL; c_floodedleafs = 0; for ( i = 1; i < numEntities; i++ ) { @@ -684,10 +685,10 @@ int FloodEntities( tree_t *tree ){ e = &entities[ i ]; /* get origin */ - GetVectorForKey( e, "origin", origin ); + found = GetVectorForKey( e, "origin", origin ); /* as a special case, allow origin-less entities */ - if ( VectorCompare( origin, vec3_origin ) ) { + if ( !found ) { continue; }