Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3529 in orxonox.OLD for orxonox/trunk/src/story_entities/world.cc


Ignore:
Timestamp:
Mar 13, 2005, 10:39:28 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: zero-loop problem in pnode, dynamic pnode realocation. unstable, segfault when changing level.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/story_entities/world.cc

    r3527 r3529  
    4242{
    4343  this->init(name, -1);
     44  printf("World::World - generating Nullparent\n");
     45  NullParent* np = NullParent::getInstance();
    4446}
    4547
     
    6769
    6870  this->localCamera->destroy();
    69   this->nullParent->destroy(); 
     71  this->nullParent->destroy();
     72  delete this->nullParent;
    7073  //delete this->skySphere;
    7174
     
    252255            this->nullParent->setName ("NullParent");
    253256
    254 
    255 
    256257            // create a player
    257258            WorldEntity* myPlayer = new Player();
     
    804805void World::spawn(WorldEntity* entity)
    805806{
    806   if( this->nullParent != NULL && entity->parent == NULL)
    807     this->nullParent->addChild (entity);
    808 
     807  this->nullParent->addChild (entity);
    809808  this->entities->add (entity);
    810 
    811809  entity->postSpawn ();
    812810}
     
    821819void World::spawn(WorldEntity* entity, Vector* absCoor, Quaternion* absDir)
    822820{
     821  this->nullParent->addChild (entity);
     822  this->entities->add (entity);
     823
    823824  entity->setAbsCoor (absCoor);
    824825  entity->setAbsDir (absDir);
    825  
    826   if( this->nullParent != NULL && entity->parent == NULL)
    827     this->nullParent->addChild (entity);
    828 
    829   this->entities->add (entity);
    830826
    831827  entity->postSpawn ();
     
    845841{
    846842
    847   if( parentNode != NULL && entity->parent == NULL)
     843  if( parentNode != NULL)
    848844    {
    849845      parentNode->addChild (entity);
Note: See TracChangeset for help on using the changeset viewer.