Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8685 in orxonox.OLD


Ignore:
Timestamp:
Jun 21, 2006, 8:52:20 PM (18 years ago)
Author:
patrick
Message:

bsp: fps player added, woking on it

Location:
branches/bsp_model/src
Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • branches/bsp_model/src/defs/class_id.h

    r8514 r8685  
    192192  CL_SPECTATOR                  =    0x00000360,
    193193  CL_COLLISION_PROBE            =    0x00000361,
     194  CL_FPS_PLAYER                 =    0x00000362,
    194195
    195196  // Powerups
  • branches/bsp_model/src/lib/event/key_mapper.cc

    r7677 r8685  
    4545int KeyMapper::PEV_STRAFE_LEFT       = EV_UNKNOWN;
    4646int KeyMapper::PEV_STRAFE_RIGHT      = EV_UNKNOWN;
     47int KeyMapper::PEV_JUMP              = EV_UNKNOWN;
    4748
    4849int KeyMapper::PEV_FIRE1             = EV_UNKNOWN;
     
    8384  {&KeyMapper::PEV_STRAFE_LEFT,          "StrafeLeft",                       SDLK_q},
    8485  {&KeyMapper::PEV_STRAFE_RIGHT,         "StrafeRight",                      SDLK_e},
     86  {&KeyMapper::PEV_JUMP,                 "Jump",                             SDLK_SPACE},
    8587
    8688  {&KeyMapper::PEV_FIRE1,                CONFIG_NAME_PLAYER_FIRE,            EV_MOUSE_BUTTON_LEFT},
  • branches/bsp_model/src/lib/event/key_mapper.h

    r7661 r8685  
    5555  static int PEV_STRAFE_RIGHT;      //!< strafe right button
    5656
     57  static int PEV_JUMP;              //!< jump
     58
    5759  static int PEV_FIRE1;             //!< fire button 1
    5860  static int PEV_FIRE2;             //!< fire button 2
  • branches/bsp_model/src/lib/graphics/importer/interactive_model.h

    r8490 r8685  
    3737
    3838    virtual void setAnimation(int animNum, int playbackMode = 0) = 0;
     39    virtual int getAnimation() = 0;
    3940};
    4041
  • branches/bsp_model/src/lib/graphics/importer/md2/md2Model.h

    r8490 r8685  
    159159  virtual void setAnimation(int type, int animPlayback = MD2_ANIM_LOOP);
    160160  /**  returns the current animation @returns animation type */
    161   inline int MD2Model::getAnim() { return this->animationState.type; }
     161  inline int MD2Model::getAnimation() { return this->animationState.type; }
    162162  /**  scales the current model @param scaleFactor: the factor [0..1] to use for scaling */
    163163  void scaleModel(float scaleFactor) { this->scaleFactor = scaleFactor;}
  • branches/bsp_model/src/lib/graphics/importer/md3/md3_model.h

    r8656 r8685  
    4545
    4646    virtual void setAnimation(int animNum, int playbackMode = 0) {}
     47    virtual int getAnimation() { return 0;}
    4748
    4849    virtual void tick(float dt);
  • branches/bsp_model/src/world_entities/WorldEntities.am

    r8514 r8685  
    4242                world_entities/space_ships/collision_probe.cc \
    4343                world_entities/creatures/md2_creature.cc \
     44                world_entities/creatures/fps_player.cc \
    4445                world_entities/spectator.cc \
    4546                \
     
    9899                space_ships/collision_probe.cc \
    99100                creatures/md2_creature.h \
     101                creatures/fps_player.h \
    100102                spectator.h \
    101103                \
  • branches/bsp_model/src/world_entities/creatures/md2_creature.cc

    r8524 r8685  
    262262  else if( this->bFire && likely(this->getModel(0) != NULL))
    263263  {
    264     if( ((MD2Model*)this->getModel(0))->getAnim() != ATTACK)
     264    if( ((MD2Model*)this->getModel(0))->getAnimation() != ATTACK)
    265265      ((MD2Model*)this->getModel(0))->setAnimation(ATTACK);
    266266  }
    267267  else if( fabs(move.len()) > 0.0f && likely(this->getModel(0) != NULL))
    268268  {
    269     if( ((MD2Model*)this->getModel(0))->getAnim() != RUN)
     269    if( ((MD2Model*)this->getModel(0))->getAnimation() != RUN)
    270270      ((MD2Model*)this->getModel(0))->setAnimation(RUN);
    271271  }
    272272  else if (likely(this->getModel(0) != NULL))
    273273  {
    274     if( ((MD2Model*)this->getModel(0))->getAnim() != STAND)
     274    if( ((MD2Model*)this->getModel(0))->getAnimation() != STAND)
    275275      ((MD2Model*)this->getModel(0))->setAnimation(STAND);
    276276  }
Note: See TracChangeset for help on using the changeset viewer.