Changeset 3982 in orxonox.OLD for orxonox/trunk/src/util/animation/t_animation.h
- Timestamp:
- Apr 26, 2005, 3:17:43 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/animation/t_animation.h
r3979 r3982 192 192 if (localTime >= this->currentKeyFrame->duration) 193 193 { 194 // switching to the next Key-Frame 195 this->localTime -= this->currentKeyFrame->duration; 196 197 this->currentKeyFrame = this->nextKeyFrame; 198 // checking, if we should still Play the animation 199 if (this->currentKeyFrame == this->keyFrameList->lastElement()) 200 this->handleInfinity(); 201 this->nextKeyFrame = this->keyFrameList->nextElement(this->currentKeyFrame); 202 203 printf("%p from:%f to:%f\n", this->currentKeyFrame,this->currentKeyFrame->value, this->nextKeyFrame->value); 204 this->setAnimFunc(this->currentKeyFrame->animFunc); 194 if (likely(this->keyFramesToPlay != 0)) 195 { 196 if (unlikely(this->keyFramesToPlay > 0)) 197 --this->keyFramesToPlay; 198 // switching to the next Key-Frame 199 this->localTime -= this->currentKeyFrame->duration; 200 201 this->currentKeyFrame = this->nextKeyFrame; 202 // checking, if we should still Play the animation 203 if (this->currentKeyFrame == this->keyFrameList->lastElement()) 204 this->handleInfinity(); 205 this->nextKeyFrame = this->keyFrameList->nextElement(this->currentKeyFrame); 206 207 printf("%p from:%f to:%f\n", this->currentKeyFrame,this->currentKeyFrame->value, this->nextKeyFrame->value); 208 this->setAnimFunc(this->currentKeyFrame->animFunc); 209 } 210 else 211 this->pause(); 205 212 } 206 213
Note: See TracChangeset
for help on using the changeset viewer.