Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 14, 2005, 9:58:58 AM (19 years ago)
Author:
chris
Message:

orxonox/branches/levelloader: First incarnation of a debugworld loaded from a XML-File in place, compilability in place, all necessary basic loading constuctors in place. Unfortunately the code still generates interferences with the old hardcoded debugworld resulting in SegFault crash.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/levelloader/src/story_entities/campaign.cc

    r3530 r3542  
    5656        }
    5757        else this->setStoryID( id);
    58        
     58 
    5959  // find WorldList
    6060  element = root->FirstChildElement( "WorldList");
    6161 
    6262  // load Worlds/Subcampaigns/Whatever
     63  StoryEntity* lastCreated = NULL;
    6364        while( element != NULL)
    6465        {
    6566                StoryEntity* created = (StoryEntity*) loader->fabricate( element);
    66                 if( created != NULL) addEntity( created);
     67                if( lastCreated != NULL) created->setNextStoryID( lastCreated->getStoryID());
     68                if( created != NULL)
     69                {
     70                        this->addEntity( created);     
     71                        lastCreated = created;
     72                }
    6773                element = element->NextSiblingElement();
    6874        }
     75        if( lastCreated != NULL)        lastCreated->setStoryID( WORLD_ID_GAMEEND);
    6976}
    7077
Note: See TracChangeset for help on using the changeset viewer.