fixed func_static model dragging
[xonotic/netradiant.git] / plugins / entity / doom3group.cpp
index 5d819909f5d13eb199715029a4a53713587451e5..4fbc0ccfb7b20c86162408f75b2132c0489d094a 100644 (file)
@@ -96,7 +96,9 @@ class Doom3Group :
 
 public:
   NURBSCurve m_curveNURBS;
+  SignalHandlerId m_curveNURBSChanged;
   CatmullRomSpline m_curveCatmullRom;
+  SignalHandlerId m_curveCatmullRomChanged;
 private:
   mutable AABB m_curveBounds;
 
@@ -226,8 +228,8 @@ private:
     m_transform.localToParent() = g_matrix4_identity;
     if(isModel())
     {
-      matrix4_translate_by_vec3(m_transform.localToParent(), m_originKey.m_origin);
-      matrix4_multiply_by_matrix4(m_transform.localToParent(), rotation_toMatrix(m_rotationKey.m_rotation));
+      matrix4_translate_by_vec3(m_transform.localToParent(), m_origin);
+      matrix4_multiply_by_matrix4(m_transform.localToParent(), rotation_toMatrix(m_rotation));
     }
     m_transformChanged();
     if(!isModel())
@@ -522,8 +524,8 @@ public:
     m_curveCatmullRom(m_contained.m_curveCatmullRom.m_controlPointsTransformed, SelectionChangedComponentCaller(*this))
   {
     m_contained.instanceAttach(Instance::path());
-    m_contained.m_curveNURBS.attach(CurveEdit::CurveChangedCaller(m_curveNURBS));
-    m_contained.m_curveCatmullRom.attach(CurveEdit::CurveChangedCaller(m_curveCatmullRom));
+    m_contained.m_curveNURBSChanged = m_contained.m_curveNURBS.connect(CurveEdit::CurveChangedCaller(m_curveNURBS));
+    m_contained.m_curveCatmullRomChanged = m_contained.m_curveCatmullRom.connect(CurveEdit::CurveChangedCaller(m_curveCatmullRom));
 
     StaticRenderableConnectionLines::instance().attach(*this);
   }
@@ -531,8 +533,8 @@ public:
   {
     StaticRenderableConnectionLines::instance().detach(*this);
 
-    m_contained.m_curveCatmullRom.detach(CurveEdit::CurveChangedCaller(m_curveCatmullRom));
-    m_contained.m_curveNURBS.detach(CurveEdit::CurveChangedCaller(m_curveNURBS));
+    m_contained.m_curveCatmullRom.disconnect(m_contained.m_curveCatmullRomChanged);
+    m_contained.m_curveNURBS.disconnect(m_contained.m_curveNURBSChanged);
     m_contained.instanceDetach(Instance::path());
   }
   void renderSolid(Renderer& renderer, const VolumeTest& volume) const