From a2e7037b16e409226bed4bd927ffdc8d2f806acd Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 18 Jul 2007 06:47:53 +0000 Subject: [PATCH] clarify assertions --- panda/src/char/characterJointEffect.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/panda/src/char/characterJointEffect.cxx b/panda/src/char/characterJointEffect.cxx index 8382e4dac9..34da15a1a8 100644 --- a/panda/src/char/characterJointEffect.cxx +++ b/panda/src/char/characterJointEffect.cxx @@ -63,6 +63,7 @@ make(Character *character) { // itself on whether its pointer is valid or not. if (!new_effect->_character.is_valid_pointer()) { + nassertr(new_effect->_character.get_orig() == character, new_effect_raw); ((CharacterJointEffect *)new_effect)->_character = character; } @@ -205,8 +206,8 @@ compare_to_impl(const RenderEffect *other) const { const CharacterJointEffect *ta; DCAST_INTO_R(ta, other, 0); - if (_character != ta->_character) { - return _character < ta->_character ? -1 : 1; + if (_character.get_orig() != ta->_character.get_orig()) { + return _character.get_orig() < ta->_character.get_orig() ? -1 : 1; } // As tempting as it is to include the sense of whether the