Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 28, 2006, 5:55:06 PM (18 years ago)
Author:
patrick
Message:

door animation functions

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

Legend:

Unmodified
Added
Removed
  • branches/single_player_map/src/world_entities/door.cc

    r8878 r8879  
    2121#include "util/loading/load_param.h"
    2222
    23 
    2423#include "interactive_model.h"
     24#include "md2/md2Model.h"
    2525
    2626#include "door.h"
     
    5757  this->setClassID(CL_DOOR, "Door");
    5858  this->toList(OM_COMMON);
     59
     60  this->bLocked = false;
    5961}
    6062
     
    7072      .describe("sets the action radius of the door")
    7173      .defaultValues(1);
    72 
    7374}
    7475
     
    7778 * sets the animatin of this entity
    7879 */
    79 void  Door::setAnimation(int animationIndex, int animPlaybackMode)
     80void  Door::setAnimation(int firstFrame, int lastFrame, int fps, int bStoppable, int animPlayback)
    8081{
    8182  if( likely(this->getModel(0) != NULL))
    82     ((InteractiveModel*)this->getModel(0))->setAnimation(animationIndex, animPlaybackMode);
     83    ((InteractiveModel*)this->getModel(0))->setAnimation(firstFrame, lastFrame, fps, bStoppable, animPlayback);
     84
     85
    8386}
    8487
     
    105108    return;
    106109
    107 //   this->setAnimation();
     110  this->setAnimation(0, 1, 5, 0, MD2_ANIM_ONCE);
    108111
    109112}
  • branches/single_player_map/src/world_entities/door.h

    r8876 r8879  
    3232  private:
    3333    bool checkOpen();
    34     void setAnimation(int animationIndex, int animPlaybackMode);
     34    void setAnimation(int firstFrame, int lastFrame, int fps, int bStoppable, int animPlayback);
    3535
    3636
Note: See TracChangeset for help on using the changeset viewer.