Changeset 7071 in orxonox.OLD for trunk/src/story_entities
- Timestamp:
- Feb 7, 2006, 2:58:08 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/story_entities/multi_player_world_data.cc
r7014 r7071 141 141 element = element->FirstChildElement(); 142 142 143 while( element != NULL)144 { 145 if( NetworkManager::getInstance()->isGameServer())143 if( NetworkManager::getInstance()->isGameServer() ) 144 { 145 while( element != NULL) 146 146 { 147 147 /* pass the entity to the NetworkGameManager to be created */ … … 159 159 CDEngine::getInstance()->setTerrain(terrain); 160 160 } 161 162 element = element->NextSiblingElement(); 163 164 165 glmis->step(); 166 PRINTF(4)("Done loading NetworkWorldEntities\n"); 161 167 } 162 element = element->NextSiblingElement(); 163 164 165 glmis->step(); 166 PRINTF(4)("Done loading NetworkWorldEntities\n"); 167 } 168 } 169 else 170 { 171 while( element != NULL) 172 { 173 PRINTF(0)("load: %s\n", element->Value()); 174 if( !strcmp(element->Value(), "Terrain") || !strcmp(element->Value(), "Building") ) 175 { 176 177 /* pass the entity to the NetworkGameManager to be created */ 178 BaseObject* created = Factory::fabricate(element); 179 180 if( created != NULL ) 181 PRINTF(1)("Created a %s: %s (0x%8x) from %s\n", created->getClassName(), created->getName(), created->getLeafClassID(), element->Value()); 182 else 183 PRINTF(1)("NetworkWorld: could not create this entity\n"); 184 185 if( element->Value() != NULL && !strcmp( element->Value(), "SkyBox")) 186 this->sky = dynamic_cast<WorldEntity*>(created); 187 if( element->Value() != NULL && !strcmp( element->Value(), "Terrain")) 188 { 189 this->terrain = dynamic_cast<Terrain*>(created); 190 CDEngine::getInstance()->setTerrain(terrain); 191 } 192 193 glmis->step(); 194 PRINTF(4)("Done loading NetworkWorldEntities\n"); 195 } 196 element = element->NextSiblingElement(); 197 } 198 } 199 168 200 169 201 if( NetworkManager::getInstance()->isGameServer()) … … 180 212 playable = dynamic_cast<Playable*>(playableList->front()); 181 213 this->localPlayer->setPlayable(playable); 214 playable->toList(OM_GROUP_00); 182 215 } 183 216 }
Note: See TracChangeset
for help on using the changeset viewer.