Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6251 in orxonox.OLD for branches/network


Ignore:
Timestamp:
Dec 21, 2005, 4:40:13 PM (19 years ago)
Author:
patrick
Message:

network: debug less and client fix

Location:
branches/network/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/network/synchronizeable.cc

    r6250 r6251  
    5555void Synchronizeable::writeBytes(const byte* data, int length, int sender)
    5656{
    57   PRINTF(1)("Synchronizeable::writeBytes was called\n");
     57  PRINTF(5)("Synchronizeable::writeBytes was called\n");
    5858}
    5959
     
    6363int Synchronizeable::readBytes(byte* data, int maxLength, int * reciever)
    6464{
    65   PRINTF(1)("Synchronizeable::readBytes was called\n");
     65  PRINTF(5)("Synchronizeable::readBytes was called\n");
    6666}
    6767
  • branches/network/src/story_entities/network_world.cc

    r6250 r6251  
    352352    while( element != NULL)
    353353    {
    354       if( NetworkManager::getInstance()->isGameServer() || !strcmp( element->Value(), "SkyBox") || !strcmp( element->Value(), "Terrain")
    355           || !strcmp( element->Value(), "SpaceShip"))
     354      if( NetworkManager::getInstance()->isGameServer())
    356355      {
    357356
     
    378377        }
    379378
     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        }
    380403      }
    381404      element = element->NextSiblingElement();
Note: See TracChangeset for help on using the changeset viewer.