Changeset 3529 in orxonox.OLD for orxonox/trunk/src/story_entities
- Timestamp:
- Mar 13, 2005, 10:39:28 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/story_entities/world.cc
r3527 r3529 42 42 { 43 43 this->init(name, -1); 44 printf("World::World - generating Nullparent\n"); 45 NullParent* np = NullParent::getInstance(); 44 46 } 45 47 … … 67 69 68 70 this->localCamera->destroy(); 69 this->nullParent->destroy(); 71 this->nullParent->destroy(); 72 delete this->nullParent; 70 73 //delete this->skySphere; 71 74 … … 252 255 this->nullParent->setName ("NullParent"); 253 256 254 255 256 257 // create a player 257 258 WorldEntity* myPlayer = new Player(); … … 804 805 void World::spawn(WorldEntity* entity) 805 806 { 806 if( this->nullParent != NULL && entity->parent == NULL) 807 this->nullParent->addChild (entity); 808 807 this->nullParent->addChild (entity); 809 808 this->entities->add (entity); 810 811 809 entity->postSpawn (); 812 810 } … … 821 819 void World::spawn(WorldEntity* entity, Vector* absCoor, Quaternion* absDir) 822 820 { 821 this->nullParent->addChild (entity); 822 this->entities->add (entity); 823 823 824 entity->setAbsCoor (absCoor); 824 825 entity->setAbsDir (absDir); 825 826 if( this->nullParent != NULL && entity->parent == NULL)827 this->nullParent->addChild (entity);828 829 this->entities->add (entity);830 826 831 827 entity->postSpawn (); … … 845 841 { 846 842 847 if( parentNode != NULL && entity->parent == NULL)843 if( parentNode != NULL) 848 844 { 849 845 parentNode->addChild (entity);
Note: See TracChangeset
for help on using the changeset viewer.