- Timestamp:
- Feb 13, 2006, 1:14:53 PM (19 years ago)
- Location:
- trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/coord/p_node.cc
r7125 r7126 80 80 PNode::~PNode () 81 81 { 82 printf("delete PNode:%s::%s\n", this->getClassName(), this->getName());82 PRINTF(4)("delete %s::%s\n", this->getClassName(), this->getName()); 83 83 // remove the Node, delete it's children (if required). 84 84 std::list<PNode*>::iterator tmp = this->children.begin(); 85 85 std::list<PNode*>::iterator deleteNode; 86 unsigned int size; 86 87 while(!this->children.empty()) 87 while (tmp != this->children.end()) 88 { 89 tmp = this->children.begin(); 90 //while (tmp != this->children.end()) 88 91 { 89 92 deleteNode = tmp; 90 93 tmp++; 91 // printf("TEST::%s(%s) %s\n", (*deleteNode)->getName(), (*deleteNode)->getClassName(), this->getName());94 size = this->children.size(); 92 95 if ((this->parentMode & PNODE_PROHIBIT_CHILD_DELETE) || 93 96 ((*deleteNode)->parentMode & PNODE_PROHIBIT_DELETE_WITH_PARENT)) … … 95 98 if (this == PNode::nullParent && (*deleteNode)->parentMode & PNODE_REPARENT_TO_NULL) 96 99 { 97 printf("%s::%s deletes PNode:%s::%s\n",100 PRINTF(4)("%s::%s deletes %s::%s\n", 98 101 this->getClassName(), this->getName(), 99 102 (*deleteNode)->getClassName(), (*deleteNode)->getName()); … … 102 105 else 103 106 { 104 printf("%s::%s reparents PNode:%s::%s\n",107 PRINTF(4)("%s::%s reparents %s::%s\n", 105 108 this->getClassName(), this->getName(), 106 109 (*deleteNode)->getClassName(), (*deleteNode)->getName()); 107 108 110 (*deleteNode)->reparent(); 109 111 } … … 111 113 else 112 114 { 113 printf("%s::%s deletes PNode: %s::%s\n",115 PRINTF(4)("%s::%s deletes PNode: %s::%s\n", 114 116 this->getClassName(), this->getName(), 115 117 (*deleteNode)->getClassName(), (*deleteNode)->getName()); 116 118 delete (*deleteNode); 117 119 } 120 //if (size <= this->children.size()) break; 118 121 } 122 } 119 123 120 124 if (this->parent != NULL) -
trunk/src/orxonox.cc
r7123 r7126 120 120 121 121 SDL_QuitSubSystem(SDL_INIT_TIMER); 122 ClassList::debug( 3);122 ClassList::debug(); 123 123 124 124 PRINT(3) -
trunk/src/story_entities/game_world_data.cc
r7125 r7126 252 252 FastFactory::flushAll(true); 253 253 GraphicsEngine::getInstance()->displayFPS(false); 254 State::setPlayer(NULL);255 254 // erease everything that is left. 256 255 // delete PNode::getNullParent(); // not needed as this is also done in the next step (and also much cleaner) … … 261 260 while (!nodeList->empty()) 262 261 { 263 ClassList::debug( 3, CL_PARENT_NODE); 264 PNode::getNullParent()->debugNode( 1); 265 266 /* printf("%s::%s\n", nodeList->front()->getClassName(), nodeList->front()->getName());*/ 262 // ClassList::debug( 3, CL_PARENT_NODE); 263 // PNode::getNullParent()->debugNode(0); 264 // printf("%s::%s\n", nodeList->front()->getClassName(), nodeList->front()->getName()); 267 265 delete nodeList->front(); 268 printf("OK\n");269 266 } 270 267 /* remove the player object */ 271 268 if( this->localPlayer) 272 269 delete this->localPlayer; 270 State::setPlayer(NULL); 273 271 274 272 nodeList = ClassList::getList(CL_GRAPHICS_EFFECT); -
trunk/src/world_entities/environments/water.cc
r7125 r7126 63 63 Water::~Water() 64 64 { 65 delete this->grid;66 65 } 67 66 -
trunk/src/world_entities/space_ships/turbine_hover.cc
r7125 r7126 80 80 Weapon* wpLeft = new TestGun(1); 81 81 wpLeft->setName("testGun Left"); 82 Weapon* cannon = dynamic_cast<Weapon*>(Factory::fabricate(CL_HYPERBLASTER));83 84 cannon->setName("BFG");82 //Weapon* cannon = dynamic_cast<Weapon*>(Factory::fabricate(CL_HYPERBLASTER)); 83 84 // cannon->setName("BFG"); 85 85 86 86 this->addWeapon(wpLeft, 1, 0); 87 87 this->addWeapon(wpRight,1 ,1); 88 this->addWeapon(cannon, 0, 2);88 //this->addWeapon(cannon, 0, 2); 89 89 90 90 this->getWeaponManager()->changeWeaponConfig(1); -
trunk/src/world_entities/weapons/weapon.cc
r7102 r7126 29 29 #include "state.h" 30 30 #include "animation3d.h" 31 #include "vector.h"32 31 33 32 #include "sound_source.h" … … 86 85 this->soundSource = new SoundSource(this); //< Every Weapon has exacty one SoundSource. 87 86 this->emissionPoint.setParent(this); //< One EmissionPoint, that is a PNode connected to the weapon. You can set this to the exitting point of the Projectiles 87 this->emissionPoint.setName("EmissionPoint"); 88 this->emissionPoint.addNodeFlags(PNODE_PROHIBIT_DELETE_WITH_PARENT); 88 89 89 90 this->defaultTarget = NULL; //< Nothing is Targeted by default.
Note: See TracChangeset
for help on using the changeset viewer.