Changeset 9003 in orxonox.OLD for trunk/src/world_entities/bsp_entity.cc
- Timestamp:
- Jul 2, 2006, 1:36:13 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/bsp_entity.cc
r8490 r9003 1 1 /* 2 2 orxonox - the future of 3D-vertical-scrollers 3 3 4 4 Copyright (C) 2004 orx 5 5 6 6 This program is free software; you can redistribute it and/or modify 7 7 it under the terms of the GNU General Public License as published by 8 8 the Free Software Foundation; either version 2, or (at your option) 9 9 any later version. 10 10 11 11 ### File Specific: 12 12 main-programmer: Claudio Botta … … 15 15 16 16 #include "bsp_entity.h" 17 #include "util/loading/resource_manager.h" 17 18 #include "util/loading/resource_manager.h" 18 19 … … 38 39 BspEntity::~BspEntity () 39 40 { 40 if( this->bspManager )41 if( this->bspManager != NULL) 41 42 delete this->bspManager; 42 43 } 44 43 45 44 46 … … 49 51 void BspEntity::init() 50 52 { 51 this->setClassID(CL_BSP_ENTITY, "BspEntity");52 53 53 this->bspManager = new BspManager(this); 54 this->toList(OM_ENVIRON); 55 54 this->bspManager = NULL; 56 55 /** 57 56 * @todo: Write CL_BSP_ENTITY INTO THE src/defs/class_id.h (your own definition) … … 64 63 PRINTF(0)("+++++++++++ LOADING NAME %s\n", name.c_str()); 65 64 66 this->bspManager->load(name.c_str(), 0.1f); 65 // Check wether file exists.... 66 if ( File(ResourceManager::getFullName(name)).exists() ) { 67 68 this->setClassID(CL_BSP_ENTITY, "BspEntity"); 69 this->bspManager = new BspManager(this); 70 71 if(this->bspManager->load(name.c_str(), 0.1f) == -1 ) { 72 this->bspManager = NULL; 73 74 } else { 75 this->toList(OM_ENVIRON); // Success!!! 76 } 77 } else { 78 this->bspManager = NULL; 79 this->toList(OM_DEAD); 80 } 67 81 } 68 82 … … 76 90 { 77 91 // all the clases this Entity is directly derived from must be called in this way, to load all settings. 78 // WorldEntity::loadParam(root);92 // WorldEntity::loadParam(root); 79 93 80 94 LoadParam(root, "Name", this, BspEntity, setName) 81 95 .describe("Sets the of the BSP file."); 82 96 83 /* LoadParam(root, "Scale", this, BSpEntity, setScale)84 .describe("Sets the scale factore of the bsp level.");85 */97 /* LoadParam(root, "Scale", this, BSpEntity, setScale) 98 .describe("Sets the scale factore of the bsp level."); 99 */ 86 100 87 101 /** … … 115 129 */ 116 130 void BspEntity::collidesWith (WorldEntity* entity, const Vector& location) 117 { 118 119 } 131 {}
Note: See TracChangeset
for help on using the changeset viewer.