Changeset 3982 in orxonox.OLD for orxonox/trunk/src/util/animation/animation3d.cc
- Timestamp:
- Apr 26, 2005, 3:17:43 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/animation/animation3d.cc
r3981 r3982 138 138 if (localTime >= this->currentKeyFrame->duration) 139 139 { 140 // switching to the next Key-Frame 141 this->localTime -= this->currentKeyFrame->duration; 142 this->currentKeyFrame = this->nextKeyFrame; 143 // checking, if we should still Play the animation 144 if (this->currentKeyFrame == this->keyFrameList->lastElement()) 145 this->handleInfinity(); 146 this->nextKeyFrame = this->keyFrameList->nextElement(this->currentKeyFrame); 147 this->setAnimFuncMov(this->currentKeyFrame->animFuncMov); 148 this->setAnimFuncRot(this->currentKeyFrame->animFuncRot); 149 } 140 if (likely(this->keyFramesToPlay != 0)) 141 { 142 if (unlikely(this->keyFramesToPlay > 0)) 143 --this->keyFramesToPlay; 144 // switching to the next Key-Frame 145 this->localTime -= this->currentKeyFrame->duration; 146 this->currentKeyFrame = this->nextKeyFrame; 147 // checking, if we should still Play the animation 148 if (this->currentKeyFrame == this->keyFrameList->lastElement()) 149 this->handleInfinity(); 150 this->nextKeyFrame = this->keyFrameList->nextElement(this->currentKeyFrame); 151 this->setAnimFuncMov(this->currentKeyFrame->animFuncMov); 152 this->setAnimFuncRot(this->currentKeyFrame->animFuncRot); 153 } 154 else 155 this->pause(); 156 } 150 157 /* now animate it */ 151 158 (this->*animFuncMov)(this->localTime);
Note: See TracChangeset
for help on using the changeset viewer.