Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 22, 2006, 12:17:28 PM (18 years ago)
Author:
patrick
Message:

bsp: work flush, some more npc functions, and a positioning aid

File:
1 edited

Legend:

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

    r8590 r8705  
    6969    ResourceManager::getInstance()->unload(this->soundBuffer);
    7070  this->soundBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/rain.wav", WAV);
     71
     72  // collision reaction registration
     73  this->subscribeReaction(CREngine::CR_PHYSICS_GROUND_WALK, CL_BSP_ENTITY);
    7174}
    7275
     
    7881void GenericNPC::loadParams(const TiXmlElement* root)
    7982{
    80   WorldEntity::loadParams(root);
    81 
    82   LoadParam(root, "md2animation", this, GenericNPC, setAnimation)
    83       .describe("sets the animation of the md2 model")
    84       .defaultValues(1);
     83  NPC::loadParams(root);
    8584
    8685}
     
    104103 * @param anumPlaybackMode: the playback mode
    105104 */
    106 bool GenericNPC::playAnimation(int animationIndex, int animPlaybackMode)
     105void GenericNPC::playAnimation(int animationIndex, int animPlaybackMode)
    107106{
    108107  if( likely(this->getModel(0) != NULL))
    109108    ((InteractiveModel*)this->getModel(0))->setAnimation(animationIndex, animPlaybackMode);
    110109
    111   return true;
    112110}
    113111
     
    117115 * @param filename: name of the file
    118116 */
    119 bool GenericNPC::playSound(std::string filename)
     117void GenericNPC::playSound(std::string filename)
    120118{
    121   return true;
     119
    122120}
    123121
Note: See TracChangeset for help on using the changeset viewer.