]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/brush_primit.cpp
Merge commit '9fed37bae007bd5e53963ec67e925381609a2980' into garux-merge
[xonotic/netradiant.git] / radiant / brush_primit.cpp
index 85ee1e46ebbb95de2502733ad8aad23efba94ae8..872dfafb5e6bba9bb66c6b14acebb06c443f1c34 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 #include "brush_primit.h"
+#include "globaldefs.h"
 
 #include "debugging/debugging.h"
 
@@ -397,11 +398,11 @@ inline BasicVector3<Element> vector3_inverse( const BasicVector3<Element>& self
 void BPMatMul( float A[2][3], float B[2][3], float C[2][3] );
 // apply a rotation (degrees)
 void BPMatRotate( float A[2][3], float theta );
-#ifdef _DEBUG
+#if GDEF_DEBUG
 void BPMatDump( float A[2][3] );
 #endif
 
-#ifdef _DEBUG
+#if GDEF_DEBUG
 //#define DBG_BP
 #endif
 
@@ -1317,7 +1318,7 @@ inline Matrix4 matrix4_reflection_for_plane45( const Plane3& plane, const Vector
        Vector3 first = from;
        Vector3 second = to;
 
-       if ( vector3_dot( from, plane.normal() ) > 0 == vector3_dot( to, plane.normal() ) > 0 ) {
+       if ( (vector3_dot( from, plane.normal() ) > 0) == (vector3_dot( to, plane.normal() ) > 0) ) {
                first = vector3_negated( first );
                second = vector3_negated( second );
        }
@@ -1335,8 +1336,6 @@ inline Matrix4 matrix4_reflection_for_plane45( const Plane3& plane, const Vector
 
        Matrix4 swap = matrix4_swap_axes( first, second );
 
-       Matrix4 tmp = matrix4_reflection_for_plane( plane );
-
        swap.tx() = -static_cast<float>( -2 * plane.a * plane.d );
        swap.ty() = -static_cast<float>( -2 * plane.b * plane.d );
        swap.tz() = -static_cast<float>( -2 * plane.c * plane.d );