Changeset 8904 in orxonox.OLD for branches/single_player_map/src/world_entities
- Timestamp:
- Jun 29, 2006, 1:40:35 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/single_player_map/src/world_entities/bsp_entity.cc
r8490 r8904 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 … … 43 44 44 45 46 45 47 /** 46 48 * initializes the BspEntity … … 50 52 { 51 53 this->setClassID(CL_BSP_ENTITY, "BspEntity"); 52 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 // War das Laden erfolgreich? 68 this->bspManager = new BspManager(this); 69 if(this->bspManager->load(name.c_str(), 0.1f) == -1 ) { 70 this->bspManager = NULL; 71 // Dont do anything 72 } else { 73 74 75 this->toList(OM_ENVIRON); // Success!!! 76 } 77 } else { 78 this->toList(OM_DEAD); 79 } 67 80 } 68 81 … … 76 89 { 77 90 // all the clases this Entity is directly derived from must be called in this way, to load all settings. 78 // WorldEntity::loadParam(root);91 // WorldEntity::loadParam(root); 79 92 80 93 LoadParam(root, "Name", this, BspEntity, setName) 81 94 .describe("Sets the of the BSP file."); 82 95 83 /* LoadParam(root, "Scale", this, BSpEntity, setScale)84 .describe("Sets the scale factore of the bsp level.");85 */96 /* LoadParam(root, "Scale", this, BSpEntity, setScale) 97 .describe("Sets the scale factore of the bsp level."); 98 */ 86 99 87 100 /** … … 115 128 */ 116 129 void BspEntity::collidesWith (WorldEntity* entity, const Vector& location) 117 { 118 119 } 130 {}
Note: See TracChangeset
for help on using the changeset viewer.