- Timestamp:
- Jun 22, 2006, 12:17:28 PM (18 years ago)
- 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 272 272 this->yMouse += event.yRel; 273 273 } 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 69 69 ResourceManager::getInstance()->unload(this->soundBuffer); 70 70 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); 71 74 } 72 75 … … 78 81 void GenericNPC::loadParams(const TiXmlElement* root) 79 82 { 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); 85 84 86 85 } … … 104 103 * @param anumPlaybackMode: the playback mode 105 104 */ 106 boolGenericNPC::playAnimation(int animationIndex, int animPlaybackMode)105 void GenericNPC::playAnimation(int animationIndex, int animPlaybackMode) 107 106 { 108 107 if( likely(this->getModel(0) != NULL)) 109 108 ((InteractiveModel*)this->getModel(0))->setAnimation(animationIndex, animPlaybackMode); 110 109 111 return true;112 110 } 113 111 … … 117 115 * @param filename: name of the file 118 116 */ 119 boolGenericNPC::playSound(std::string filename)117 void GenericNPC::playSound(std::string filename) 120 118 { 121 return true; 119 122 120 } 123 121 -
branches/bsp_model/src/world_entities/npcs/generic_npc.h
r8581 r8705 33 33 inline void setVolume(float vol) { this->soundVolume = vol; } 34 34 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 37 40 bool walkTo(const Vector& coordinate, float time); 38 41 bool walkTo(float x, float y, float z, float time);
Note: See TracChangeset
for help on using the changeset viewer.