diff --git a/panda/src/audio/audio_sound.h b/panda/src/audio/audio_sound.h index fa07deaa99..9f65c1eb80 100644 --- a/panda/src/audio/audio_sound.h +++ b/panda/src/audio/audio_sound.h @@ -54,13 +54,13 @@ public: } static void init_type(void) { /* - TypedReferenceCount::init_type(); - register_type(_type_handle, "AudioSound", - TypedReferenceCount::get_class_type()); - */ TypedObject::init_type(); register_type(_type_handle, "AudioSound", TypedObject::get_class_type()); + */ + TypedReferenceCount::init_type(); + register_type(_type_handle, "AudioSound", + TypedReferenceCount::get_class_type()); } virtual TypeHandle get_type(void) const { return get_class_type(); diff --git a/panda/src/graph/nodeRelation.cxx b/panda/src/graph/nodeRelation.cxx index 99bb83a21a..2cb809f103 100644 --- a/panda/src/graph/nodeRelation.cxx +++ b/panda/src/graph/nodeRelation.cxx @@ -518,20 +518,14 @@ attach() { _net_transitions.clear(); _last_update = ++last_graph_update(_type); - /* // If we have just added a new parent arc to a node that previously - // had exactly one parent, we also need to increment the update - // counter for all the children of that node. + // had exactly one parent, we also need to set the update sequence + // counter for the other parent arc, since we have fundamentally + // changed the nature of the node from non-instanced to instanced. if (child_list.size() == 2) { - cerr << "Attaching " << *this << " at " << _last_update << "\n"; - DownRelationPointers &child_children = _child->_children[_type]; - DownRelationPointers::iterator drpi; - for (drpi = child_children.begin(); drpi != child_children.end(); ++drpi) { - cerr << "Forcing update for " << *(*drpi) << "\n"; - (*drpi)->_last_update = _last_update; - } + child_list[0]->_last_update = _last_update; + child_list[1]->_last_update = _last_update; } - */ _parent->force_bound_stale(); mark_bound_stale(); @@ -578,18 +572,13 @@ detach() { _net_transitions.clear(); _last_update = ++last_graph_update(_type); - /* // If we have just removed a parent arc from a node, leaving exactly - // one parent, we also need to increment the update counter for all - // the children of that node. + // one parent, we also need to set the update sequence + // counter for the other parent arc, since we have fundamentally + // changed the nature of the node from instanced to non-instanced. if (child_list.size() == 1) { - DownRelationPointers &child_children = _child->_children[_type]; - DownRelationPointers::iterator drpi; - for (drpi = child_children.begin(); drpi != child_children.end(); ++drpi) { - (*drpi)->_last_update = _last_update; - } + child_list[0]->_last_update = _last_update; } - */ return result; } diff --git a/panda/src/graph/wrt.I b/panda/src/graph/wrt.I index b429ab6cd7..ded1ad41d1 100644 --- a/panda/src/graph/wrt.I +++ b/panda/src/graph/wrt.I @@ -789,14 +789,14 @@ cached_wrt_subtree(NodeRelation *arc, Node *to, UpdateSeq as_of, UpdateSeq now, // This, of course, assumes we haven't just asked for the wrt() // from the very latest timestamp. #ifndef NDEBUG - if (wrt_cat.is_info()) { - wrt_cat.info() + if (wrt_cat.is_warning()) { + wrt_cat.warning() << "Recovering from stale cache.\n"; } #endif nassertr(as_of != UpdateSeq::fresh(), NULL); - return cached_wrt_subtree(arc, to, UpdateSeq::fresh(), - UpdateSeq::fresh(), result, graph_type); + return cached_wrt_subtree(arc, to, UpdateSeq::fresh(), now, + result, graph_type); } nassertr(to->get_num_parents(graph_type) == 1, NULL);