X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=radiant%2Fbrush_primit.cpp;h=2b11807e548721443ecb88748c62410a40f51d13;hb=db8df63a54806b93fb5bc4f5501dfb29f30902f4;hp=4ea73c0356a7572e168bc12dec3381d1044f4fbe;hpb=dac8329952745dbb494bad1c301e44bab05ec0db;p=xonotic%2Fnetradiant.git diff --git a/radiant/brush_primit.cpp b/radiant/brush_primit.cpp index 4ea73c03..2b11807e 100644 --- a/radiant/brush_primit.cpp +++ b/radiant/brush_primit.cpp @@ -20,6 +20,7 @@ */ #include "brush_primit.h" +#include "globaldefs.h" #include "debugging/debugging.h" @@ -397,11 +398,11 @@ inline BasicVector3 vector3_inverse( const BasicVector3& 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 @@ -1235,7 +1236,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 ); } @@ -1253,8 +1254,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( -2 * plane.a * plane.d ); swap.ty() = -static_cast( -2 * plane.b * plane.d ); swap.tz() = -static_cast( -2 * plane.c * plane.d );