]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/patch.h
...
[xonotic/netradiant.git] / radiant / patch.h
index bea33119a85263539951c213b7b11b4c88c0f351..ddbbffbd2cc4c993fa46cbe2a2038d6addfb2993 100644 (file)
@@ -43,6 +43,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 #include "debugging/debugging.h"
 
 #include <set>
+#include <limits>
 
 #include "math/frustum.h"
 #include "string/string.h"
@@ -115,7 +116,7 @@ struct BezierCurve
   Vector3 right;
 };
 
-const std::size_t BEZIERCURVETREE_MAX_INDEX = 1 << ((sizeof(std::size_t) * 8) - 1);
+const std::size_t BEZIERCURVETREE_MAX_INDEX = std::size_t(1) << (std::numeric_limits<std::size_t>::digits - 1);
 
 struct BezierCurveTree
 {
@@ -534,6 +535,7 @@ public:
     TransformNode(other),
     Bounded(other),
     Cullable(other),
+    Snappable(),
     Undoable(other),
     Filterable(other),
     Nameable(other),
@@ -1720,7 +1722,7 @@ public:
 
     if(m_dragPlanes.isSelected()) // this should only be true when the transform is a pure translation.
     {
-      m_patch.transform(m_dragPlanes.evaluateTransform(matrix.t()));
+      m_patch.transform(m_dragPlanes.evaluateTransform(vector4_to_vector3(matrix.t())));
     }
   }