Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9104 in orxonox.OLD for branches/presentation


Ignore:
Timestamp:
Jul 4, 2006, 5:06:02 AM (19 years ago)
Author:
patrick
Message:

jump animation and debugs

Location:
branches/presentation/src/world_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/world_entities/creatures/fps_player.cc

    r9103 r9104  
    149149  registerVar( new SynchronizeableFloat( &heading, &heading, "heading", PERMISSION_OWNER ) );
    150150  registerVar( new SynchronizeableFloat( &attitude, &attitude, "attitude", PERMISSION_OWNER ) );
    151 
    152 
    153   // collision reaction registration
    154   this->subscribeReaction(CREngine::CR_PHYSICS_GROUND_WALK, CL_BSP_ENTITY);
    155151}
    156152
     
    225221  {
    226222    this->bPosBut = false;
    227     printf("mechanic:walkTo( %f, mheight, %f)\n",this->getAbsCoorX(),this->getAbsCoorZ());
     223    printf("mechanic:walkTo( %f, %f, %f)\n",this->getAbsCoorX(),this->getAbsCoorY(),this->getAbsCoorZ());
    228224  }
    229225
     
    275271  velocity *= 100;
    276272
    277   if(velocity.len() != 0.0f)
     273  if( this->bJump && likely(this->getModel(0) != NULL))
     274  {
     275    if( ((InteractiveModel*)this->getModel(0))->getAnimation() != JUMP)
     276      ((InteractiveModel*)this->getModel(0))->setAnimation(JUMP);
     277  }
     278  else if(velocity.len() != 0.0f)
    278279  {
    279280    if( ((InteractiveModel*)this->getModel(0))->getAnimation() != RUN)
     
    316317
    317318
    318     if( this->bJump && likely(this->getModel(0) != NULL))
    319     {
    320       if( ((InteractiveModel*)this->getModel(0))->getAnimation() != JUMP)
    321         ((InteractiveModel*)this->getModel(0))->setAnimation(JUMP);
    322     }
     319
    323320
    324321//     else if( this->bFire && likely(this->getModel(0) != NULL))
     
    376373  }
    377374  else if( event.type == KeyMapper::PEV_JUMP)
     375    this->bJump = event.bPressed;
    378376    this->bPosBut = event.bPressed;
    379377}
  • branches/presentation/src/world_entities/playable.cc

    r9078 r9104  
    6767  this->bDead = false;
    6868
     69  //subscribe to collision reaction
    6970  this->subscribeReaction(CREngine::CR_PHYSICS_GROUND_WALK, CL_BSP_ENTITY);
    7071
Note: See TracChangeset for help on using the changeset viewer.