Browse Source

minor bugs

David Rose 18 years ago
parent
commit
2b13b92419

+ 3 - 1
panda/src/chan/Sources.pp

@@ -21,7 +21,9 @@
     animControl.I animControl.N  \
     animControl.h animControlCollection.I  \
     animControlCollection.h animGroup.I animGroup.h auto_bind.h  \
-    config_chan.h movingPartBase.I movingPartBase.h  \
+    config_chan.h \
+    movingPart.I movingPart.h \
+    movingPartBase.I movingPartBase.h  \
     movingPartMatrix.I movingPartMatrix.h movingPartScalar.I  \
     movingPartScalar.h partBundle.I partBundle.N partBundle.h  \
     partBundleNode.I partBundleNode.h \

+ 4 - 2
panda/src/chan/movingPartBase.I

@@ -25,9 +25,11 @@
 ////////////////////////////////////////////////////////////////////
 INLINE MovingPartBase::
 MovingPartBase(const MovingPartBase &copy) :
-  PartGroup(copy)
+  PartGroup(copy),
+  _forced_channel(copy._forced_channel)
 {
-  // We don't copy the bound channels.
+  // We don't copy the bound channels.  We do copy the forced_channel,
+  // though this is just a pointerwise copy.
 }
 
 ////////////////////////////////////////////////////////////////////

+ 3 - 1
panda/src/chan/movingPartBase.cxx

@@ -136,7 +136,9 @@ do_update(PartBundle *root, const CycleData *root_cdata, PartGroup *parent,
   // See if any of the channel values have changed since last time.
 
   if (_forced_channel != (AnimChannelBase *)NULL) {
-    needs_update = _forced_channel->has_changed(0.0, 0.0);
+    if (!needs_update) {
+      needs_update = _forced_channel->has_changed(0.0, 0.0);
+    }
 
   } else {
     const PartBundle::CData *cdata = (const PartBundle::CData *)root_cdata;

+ 9 - 0
panda/src/chan/partBundle.cxx

@@ -264,6 +264,9 @@ freeze_joint(const string &joint_name, const TransformState *transform) {
     return false;
   }
 
+  CDWriter cdata(_cycler, false);
+  cdata->_anim_changed = true;
+
   return child->apply_freeze(transform);
 }
 
@@ -287,6 +290,9 @@ control_joint(const string &joint_name, PandaNode *node) {
     return false;
   }
 
+  CDWriter cdata(_cycler, false);
+  cdata->_anim_changed = true;
+
   return child->apply_control(node);
 }
 
@@ -309,6 +315,9 @@ release_joint(const string &joint_name) {
     return false;
   }
 
+  CDWriter cdata(_cycler, false);
+  cdata->_anim_changed = true;
+
   return child->clear_forced_channel();
 }