Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9103 in orxonox.OLD


Ignore:
Timestamp:
Jul 4, 2006, 4:54:36 AM (18 years ago)
Author:
patrick
Message:

animations

Location:
branches/presentation/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/lib/collision_reaction/cr_physics_ground_walk.cc

    r9101 r9103  
    118118        back = collPos.len() - box->halfLength[0];
    119119
    120         PRINTF(0)("backward: back = %f\n", back);
    121 
    122120        // object is beneath the plane (ground)
    123121        if( back <= 0.0f)
  • branches/presentation/src/world_entities/creatures/fps_player.cc

    r9102 r9103  
    2121
    2222#include "src/lib/util/loading/factory.h"
     23
     24#include "md2/md2Model.h"
    2325
    2426#include "weapons/weapon_manager.h"
     
    273275  velocity *= 100;
    274276
     277  if(velocity.len() != 0.0f)
     278  {
     279    if( ((InteractiveModel*)this->getModel(0))->getAnimation() != RUN)
     280      ((InteractiveModel*)this->getModel(0))->setAnimation(RUN);
     281  }
     282  else
     283  {
     284    if( ((InteractiveModel*)this->getModel(0))->getAnimation() != STAND)
     285      ((InteractiveModel*)this->getModel(0))->setAnimation(STAND);
     286  }
     287
     288
    275289
    276290  // physical falling of the player
     
    297311  {
    298312    ((InteractiveModel*)this->getModel(0))->tick(time);
    299 //
    300 //     // handle animations differently
    301 //     if( this->bJump && likely(this->getModel(0) != NULL))
    302 //     {
    303 //       ((InteractiveModel*)this->getModel(0))->setAnimation(JUMP);
    304 //     }
     313
     314    // handle animations differently
     315
     316
     317
     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    }
     323
    305324//     else if( this->bFire && likely(this->getModel(0) != NULL))
    306325//     {
     
    330349{
    331350  // only draw if this entity is not the player since the player nevers sees himself
    332   if( this->getCurrentPlayer() == NULL)
     351//   if( this->getCurrentPlayer() == NULL)
    333352    WorldEntity::draw();
    334353}
Note: See TracChangeset for help on using the changeset viewer.