Changeset 6191 in orxonox.OLD for branches/christmas_branche/src/world_entities
- Timestamp:
- Dec 20, 2005, 3:24:14 PM (19 years ago)
- Location:
- branches/christmas_branche/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/christmas_branche/src/world_entities/world_entity.cc
r6187 r6191 85 85 static_cast<PNode*>(this)->loadParams(root); 86 86 87 LoadParam(root, "md2texture", this, WorldEntity, loadMD2Texture) 88 .describe("the fileName of the texture, that should be loaded onto this world-entity. (must be relative to the data-dir)") 89 .defaultValues(1, NULL); 90 87 91 // Model Loading 88 92 LoadParam(root, "model", this, WorldEntity, loadModel) 89 93 .describe("the fileName of the model, that should be loaded onto this world-entity. (must be relative to the data-dir)") 90 94 .defaultValues(3, NULL, 1.0f, 0); 91 92 } 95 } 96 93 97 94 98 /** … … 135 139 PRINTF(4)("fetching MD2 file: %s\n", fileName); 136 140 // MD2Model* m = (MD2Model*)ResourceManager::getInstance()->load(fileName, MD2, RP_CAMPAIGN); 137 Model* m = new MD2Model(fileName, "md2_fake_texture.bad");141 Model* m = new MD2Model(fileName, this->md2TextureFileName); 138 142 //this->setModel((Model*)ResourceManager::getInstance()->load(fileName, MD2, RP_CAMPAIGN), 0); 139 143 this->setModel(m, 0); -
branches/christmas_branche/src/world_entities/world_entity.h
r6179 r6191 36 36 void setModel(Model* model, unsigned int modelNumber = 0); 37 37 Model* getModel(unsigned int modelNumber = 0) const { return (this->models.size() > modelNumber)? this->models[modelNumber] : NULL; }; 38 39 inline void loadMD2Texture(const char* fileName) { this->md2TextureFileName = fileName; } 38 40 39 41 bool buildObbTree(unsigned int depth); … … 79 81 private: 80 82 std::vector<Model*> models; //!< The model that should be loaded for this entity. 83 const char* md2TextureFileName; //!< the file name of the md2 model texture, only if this 81 84 BVTree* obbTree; //!< this is the obb tree reference needed for collision detection 82 85
Note: See TracChangeset
for help on using the changeset viewer.