minor bugs

This commit is contained in:
David Rose 2007-07-03 19:45:46 +00:00
parent 2088ca584a
commit 2b13b92419
4 changed files with 19 additions and 4 deletions

View File

@ -21,7 +21,9 @@
animControl.I animControl.N \ animControl.I animControl.N \
animControl.h animControlCollection.I \ animControl.h animControlCollection.I \
animControlCollection.h animGroup.I animGroup.h auto_bind.h \ 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 \ movingPartMatrix.I movingPartMatrix.h movingPartScalar.I \
movingPartScalar.h partBundle.I partBundle.N partBundle.h \ movingPartScalar.h partBundle.I partBundle.N partBundle.h \
partBundleNode.I partBundleNode.h \ partBundleNode.I partBundleNode.h \

View File

@ -25,9 +25,11 @@
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
INLINE MovingPartBase:: INLINE MovingPartBase::
MovingPartBase(const MovingPartBase &copy) : 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.
} }
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////

View File

@ -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. // See if any of the channel values have changed since last time.
if (_forced_channel != (AnimChannelBase *)NULL) { 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 { } else {
const PartBundle::CData *cdata = (const PartBundle::CData *)root_cdata; const PartBundle::CData *cdata = (const PartBundle::CData *)root_cdata;

View File

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