Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7075 in orxonox.OLD for trunk/src/lib


Ignore:
Timestamp:
Feb 7, 2006, 3:24:02 PM (19 years ago)
Author:
patrick
Message:

trunk: the test entities are now killable with the specific animation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/importer/md2Model.cc

    r7071 r7075  
    308308      this->animationState.nextFrame++;
    309309
    310       if( this->animationState.nextFrame > this->animationState.endFrame)
     310      if( this->animationState.nextFrame > this->animationState.endFrame )
    311311      {
    312         this->animationState.nextFrame = this->animationState.startFrame;
    313         this->animationState.numPlays++;
     312        if( this->animationState.animPlaybackMode == MD2_ANIM_LOOP)
     313        {
     314          this->animationState.nextFrame = this->animationState.startFrame;
     315          this->animationState.numPlays++;
     316        }
     317        else
     318        {
     319          this->animationState.nextFrame = this->animationState.endFrame;
     320        }
    314321      }
    315322      this->animationState.lastTime = this->animationState.localTime;
    316323    }
    317324
    318   if( this->animationState.currentFrame > (this->data->numFrames - 1) && this->animationState.animPlaybackMode == MD2_ANIM_LOOP)
    319     this->animationState.currentFrame = 0;
    320   if( this->animationState.nextFrame > (this->data->numFrames - 1) )
    321     this->animationState.nextFrame = 0;
     325//     if( this->animationState.currentFrame > (this->data->numFrames - 1) )
     326//       this->animationState.currentFrame = 0;
     327
     328//     if( (this->animationState.nextFrame > (this->data->numFrames - 1)) && this->animationState.animPlaybackMode == MD2_ANIM_LOOP)
     329//     this->animationState.nextFrame = 0;
    322330
    323331  this->animationState.interpolationState = this->animationState.fps *
Note: See TracChangeset for help on using the changeset viewer.