- Timestamp:
- Dec 21, 2005, 4:40:13 PM (19 years ago)
- Location:
- branches/network/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/network/synchronizeable.cc
r6250 r6251 55 55 void Synchronizeable::writeBytes(const byte* data, int length, int sender) 56 56 { 57 PRINTF( 1)("Synchronizeable::writeBytes was called\n");57 PRINTF(5)("Synchronizeable::writeBytes was called\n"); 58 58 } 59 59 … … 63 63 int Synchronizeable::readBytes(byte* data, int maxLength, int * reciever) 64 64 { 65 PRINTF( 1)("Synchronizeable::readBytes was called\n");65 PRINTF(5)("Synchronizeable::readBytes was called\n"); 66 66 } 67 67 -
branches/network/src/story_entities/network_world.cc
r6250 r6251 352 352 while( element != NULL) 353 353 { 354 if( NetworkManager::getInstance()->isGameServer() || !strcmp( element->Value(), "SkyBox") || !strcmp( element->Value(), "Terrain") 355 || !strcmp( element->Value(), "SpaceShip")) 354 if( NetworkManager::getInstance()->isGameServer()) 356 355 { 357 356 … … 378 377 } 379 378 379 } 380 else if( !strcmp( element->Value(), "SkyBox") /*|| !strcmp( element->Value(), "Terrain")*/ || !strcmp( element->Value(), "SpaceShip")) 381 { 382 BaseObject* created = Factory::fabricate(element); 383 if( created != NULL ) 384 { 385 if(created->isA(CL_WORLD_ENTITY)) 386 this->spawn(dynamic_cast<WorldEntity*>(created)); 387 printf("Created a %s: %s\n", created->getClassName(), created->getName()); 388 } 389 else 390 PRINTF(1)("NetworkWorld: could not create this entity\n"); 391 392 // if we load a 'Player' we use it as localPlayer 393 394 395 //todo do this more elegant 396 if( element->Value() != NULL && !strcmp( element->Value(), "SkyBox")) 397 sky = dynamic_cast<SkyBox*>(created); 398 if( element->Value() != NULL && !strcmp( element->Value(), "Terrain")) 399 { 400 terrain = dynamic_cast<Terrain*>(created); 401 CDEngine::getInstance()->setTerrain(terrain); 402 } 380 403 } 381 404 element = element->NextSiblingElement();
Note: See TracChangeset
for help on using the changeset viewer.