define explicit AREA_INVALID constant

This commit is contained in:
Garux
2025-09-23 04:46:33 +05:00
parent 2580a1ee17
commit 6e2d0d139b
3 changed files with 7 additions and 6 deletions
+4 -4
View File
@@ -630,7 +630,7 @@ static int c_areas;
*/
static void FloodAreas_r( node_t *node ){
if ( node->area != -1 ) {
if ( node->area != AREA_INVALID ) {
return;
}
if ( node->cluster == -1 ) {
@@ -678,7 +678,7 @@ static void FindAreas_r( node_t *node ){
return;
}
if ( node->opaque || node->area != -1 ) {
if ( node->opaque || node->area != AREA_INVALID ) {
return;
}
@@ -703,7 +703,7 @@ static void CheckAreas_r( const node_t *node ){
}
if ( node->cluster != -1 ) {
if ( node->area == -1 ) {
if ( node->area == AREA_INVALID ) {
Sys_Warning( "cluster %d has area set to -1\n", node->cluster );
}
}
@@ -717,7 +717,7 @@ static void CheckAreas_r( const node_t *node ){
*/
static void FloodSkyboxArea_r( node_t *node ){
if ( skyboxArea < 0 ) {
if ( skyboxArea == AREA_INVALID ) {
return;
}
+1 -1
View File
@@ -274,7 +274,7 @@ static void NumberLeafs_r( node_t *node, int c ){
return;
}
node->area = -1;
node->area = AREA_INVALID;
if ( node->opaque ) {
// solid block, viewpoint never inside
+2 -1
View File
@@ -130,6 +130,7 @@
#define CLIP_EPSILON 0.1f
#define PLANESIDE_EPSILON 0.001f
#define PLANENUM_LEAF -1
constexpr int AREA_INVALID = -1;
enum class EBrushType
{
@@ -1891,7 +1892,7 @@ inline const Vector3b debugColors[ 12 ] =
{ 128, 192, 128 }
};
inline int skyboxArea = -1;
inline int skyboxArea = AREA_INVALID;
inline Matrix4 skyboxTransform;