Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 18, 2005, 5:18:45 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: rearanged keyFrame-addition

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/animation/animation3d.cc

    r3874 r3876  
    9090  KeyFrame3D* tmpKeyFrame;
    9191   
    92   if (bHasKeys)
     92  // when adding the first frame
     93  if (this->keyFrameCount == 0)
     94    {
     95      tmpKeyFrame = this->keyFrameList->firstElement();
     96      this->setAnimFunc(animFunc);
     97    }
     98  else
    9399    {
    94100      tmpKeyFrame = new KeyFrame3D;
     101      // when adding the second frame
    95102      if (this->currentKeyFrame == this->nextKeyFrame)
    96103        this->nextKeyFrame = tmpKeyFrame;
    97104      this->keyFrameList->add(tmpKeyFrame);
    98 
    99     }
    100   else
    101     {
    102       tmpKeyFrame = this->keyFrameList->firstElement();
    103       bHasKeys = true;
    104       this->setAnimFunc(animFunc);
    105105    }
    106106
     
    109109  tmpKeyFrame->duration = duration;
    110110  tmpKeyFrame->animFunc = animFunc;
    111 
     111  this->keyFrameCount++;
    112112}
    113113
Note: See TracChangeset for help on using the changeset viewer.