]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - tools/quake3/q3map2/portals.c
gcc: appease the hardening warnings
[xonotic/netradiant.git] / tools / quake3 / q3map2 / portals.c
index de00fe80ba76d2e6b0d09ba81fc6e3d65843db45..9b6ec05703e48a299e364562144bb4e7bd10be42 100644 (file)
@@ -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;
                }