Changeset 9128 in orxonox.OLD for branches/presentation/src/story_entities
- Timestamp:
- Jul 4, 2006, 2:42:28 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/story_entities/multi_player_world_data.cc
r9008 r9128 109 109 ErrorMessage MultiPlayerWorldData::loadWorldEntities(const TiXmlElement* root) 110 110 { 111 /* load the spawning points */ 112 const TiXmlElement* element = root->FirstChildElement("SpawningPoints"); 113 if( element == NULL) 114 { 115 PRINTF(1)("NetworkWorld is missing 'SpawningPoints'\n"); 116 } 117 else 118 { 119 element = element->FirstChildElement(); 120 // load Players/Objects/Whatever 121 PRINTF(4)("Loading Spawning Points\n"); 122 while( element != NULL) 123 { 124 BaseObject* created = Factory::fabricate(element); 125 if( created != NULL ) 126 printf("Created a Spawning Point %s: %s\n", created->getClassName(), created->getName()); 127 128 element = element->NextSiblingElement(); 129 glmis->step(); 130 } 131 PRINTF(4)("Done loading Spawning Points\n"); 111 const TiXmlElement* element = NULL; 112 113 if( NetworkManager::getInstance()->isGameServer() ) 114 { 115 /* load the spawning points */ 116 element = root->FirstChildElement("SpawningPoints"); 117 if( element == NULL) 118 { 119 PRINTF(1)("NetworkWorld is missing 'SpawningPoints'\n"); 120 } 121 else 122 { 123 element = element->FirstChildElement(); 124 // load Players/Objects/Whatever 125 PRINTF(4)("Loading Spawning Points\n"); 126 while( element != NULL) 127 { 128 BaseObject* created = Factory::fabricate(element); 129 if( created != NULL ) 130 printf("Created a Spawning Point %s: %s\n", created->getClassName(), created->getName()); 131 132 element = element->NextSiblingElement(); 133 glmis->step(); 134 } 135 PRINTF(4)("Done loading Spawning Points\n"); 136 } 132 137 } 133 138
Note: See TracChangeset
for help on using the changeset viewer.