Răsfoiți Sursa

Minor assert changes.

Chris Culy 13 ani în urmă
părinte
comite
11ac514446
2 a modificat fișierele cu 1 adăugiri și 3 ștergeri
  1. 1 2
      gameplay/src/AnimationClip.cpp
  2. 0 1
      gameplay/src/AnimationTarget.cpp

+ 1 - 2
gameplay/src/AnimationClip.cpp

@@ -283,7 +283,7 @@ void AnimationClip::addListener(AnimationClip::Listener* listener, unsigned long
                 if (isClipStateBitSet(CLIP_IS_PLAYING_BIT))
                 {
                     unsigned long currentTime = _elapsedTime % _duration;
-                    GP_ASSERT(**_listenerItr);
+                    GP_ASSERT(**_listenerItr || *_listenerItr == _listeners->end());
                     if ((_speed >= 0.0f && currentTime < eventTime && (*_listenerItr == _listeners->end() || eventTime < (**_listenerItr)->_eventTime)) || 
                         (_speed <= 0 && currentTime > eventTime && (*_listenerItr == _listeners->begin() || eventTime > (**_listenerItr)->_eventTime)))
                         *_listenerItr = itr;
@@ -376,7 +376,6 @@ bool AnimationClip::update(unsigned long elapsedTime)
     if (_listeners)
     {
         GP_ASSERT(_listenerItr);
-        GP_ASSERT(**_listenerItr);
 
         if (_speed >= 0.0f)
         {

+ 0 - 1
gameplay/src/AnimationTarget.cpp

@@ -419,7 +419,6 @@ Animation::Channel* AnimationTarget::getChannel(const char* id) const
     if (_animationChannels)
     {
         std::vector<Animation::Channel*>::iterator itr = _animationChannels->begin();
-        GP_ASSERT(*itr);
 
         if (id == NULL)
             return (*itr);