Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 30, 2006, 2:25:36 PM (18 years ago)
Author:
patrick
Message:

animations do not jump now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/single_player_map/src/world_entities/npcs/generic_npc.cc

    r8954 r8955  
    183183    {
    184184      case Walk:
    185         this->setAnimation(RUN, MD2_ANIM_LOOP);
     185        if( this->getAnimation() != RUN)
     186          this->setAnimation(RUN, MD2_ANIM_LOOP);
    186187        break;
    187188      case Run:
    188         this->setAnimation(RUN, MD2_ANIM_LOOP);
     189        if( this->getAnimation() != RUN)
     190          this->setAnimation(RUN, MD2_ANIM_LOOP);
    189191        break;
    190192      case Crouch:
    191         this->setAnimation(CROUCH_WALK, MD2_ANIM_LOOP);
     193        if( this->getAnimation() != CROUCH_WALK)
     194          this->setAnimation(CROUCH_WALK, MD2_ANIM_LOOP);
    192195        break;
    193196      case LookAt:
     197        if( this->getAnimation() != STAND)
     198          this->setAnimation(STAND, MD2_ANIM_LOOP);
     199        break;
     200      case Shoot:
     201        if( this->getAnimation() != STAND)
    194202        this->setAnimation(STAND, MD2_ANIM_LOOP);
    195 
    196         break;
    197       case Shoot:
    198         this->setAnimation(STAND, MD2_ANIM_LOOP);
    199203        break;
    200204
    201205      default:
     206        if( this->getAnimation() != STAND)
    202207        this->setAnimation(STAND, MD2_ANIM_LOOP);
    203208        break;
     
    218223  anim.v = coordinate;
    219224  anim.type = Walk;
    220   anim.speed = 20.0f;
    221 
    222   this->behaviourList.push_back(anim);
     225  anim.speed = 30.0f;
     226
     227  if( this->behaviourList.empty())
     228  {
     229    this->behaviourList.push_back(anim);
     230  }
     231  else
     232    this->behaviourList.push_back(anim);
    223233}
    224234
Note: See TracChangeset for help on using the changeset viewer.