Changeset 6239 in orxonox.OLD for branches/network
- Timestamp:
- Dec 21, 2005, 3:29:38 PM (19 years ago)
- Location:
- branches/network/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/network/network_manager.cc
r6238 r6239 35 35 36 36 37 38 37 NetworkManager* NetworkManager::singletonRef = NULL; 39 38 40 39 /** -
branches/network/src/story_entities/network_world.cc
r6238 r6239 338 338 // find WorldEntities // 339 339 //////////////////////// 340 if( NetworkManager::getInstance()->isGameServer())341 {}342 343 340 element = root->FirstChildElement("WorldEntities"); 344 341 if( element == NULL) … … 356 353 || !strcmp( element->Value(), "SpaceShip")) 357 354 { 355 358 356 BaseObject* created = Factory::fabricate(element); 359 357 if( created != NULL ) -
branches/network/src/util/loading/factory.cc
r5984 r6239 127 127 } 128 128 129 BaseObject* Factory::fabricate(ClassID classID) 130 { 131 if (Factory::factoryList == NULL) 132 return NULL; 133 134 std::list<Factory*>::const_iterator factory; 135 for (factory = Factory::factoryList->begin(); factory != Factory::factoryList->end(); factory++) 136 if (*(*factory) == classID) 137 break; 138 139 if (factory != Factory::factoryList->end()) 140 { 141 PRINTF(4)("Create a new Object of type %s\n", (*factory)->getName()); 142 return (*factory)->fabricateObject(NULL); 143 } 144 else 145 { 146 PRINTF(2)("Could not Fabricate an Object of ClassID '%h'\n", classID); 147 return NULL; 148 } 149 } 150 129 151 130 152 /** … … 160 182 * @returns a new Object of Type classID on match, NULL otherwise 161 183 */ 162 BaseObject* Factory::fabricate(ClassID classID)163 {164 if (Factory::factoryList == NULL)165 return NULL;166 184 167 std::list<Factory*>::const_iterator factory;168 for (factory = Factory::factoryList->begin(); factory != Factory::factoryList->end(); factory++)169 if (*(*factory) == classID)170 break;171 172 if (factory != Factory::factoryList->end())173 {174 PRINTF(4)("Create a new Object of type %s\n", (*factory)->getName());175 return (*factory)->fabricateObject(NULL);176 }177 else178 {179 PRINTF(2)("Could not Fabricate an Object of ClassID '%h'\n", classID);180 return NULL;181 }182 }
Note: See TracChangeset
for help on using the changeset viewer.