Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8705 in orxonox.OLD for branches


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

Location:
branches/bsp_model/src/world_entities
Files:
3 edited

Legend:

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

    r8699 r8705  
    272272    this->yMouse += event.yRel;
    273273  }
    274 }
    275 
    276 
    277 
    278 
     274  else if( event.type == KeyMapper::PEV_JUMP)
     275    this->getAbsCoor().debug();
     276}
     277
     278
     279
     280
  • 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
  • branches/bsp_model/src/world_entities/npcs/generic_npc.h

    r8581 r8705  
    3333  inline void setVolume(float vol) { this->soundVolume = vol; }
    3434
    35   bool playAnimation(int animationIndex, int animPlaybackMode);
    36   bool playSound(std::string filename);
     35  void playAnimation(int animationIndex, int animPlaybackMode);
     36
     37  void playSound(std::string filename);
     38  void playSound(int i);
     39
    3740  bool walkTo(const Vector& coordinate, float time);
    3841  bool walkTo(float x, float y, float z, float time);
Note: See TracChangeset for help on using the changeset viewer.