Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 1, 2006, 2:28:16 PM (19 years ago)
Author:
patrick
Message:

trunk: merged the network branche back to trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/story_entities/multi_player_world_data.cc

    r7954 r8068  
    4545#include "network_manager.h"
    4646#include "network_game_manager.h"
     47#include "player_stats.h"
    4748
    4849
     
    146147      {
    147148        /* pass the entity to the NetworkGameManager to be created */
    148         BaseObject* created = NetworkGameManager::getInstance()->createEntity(element);
     149        BaseObject* created = Factory::fabricate(element);
    149150        if( created != NULL )
    150151          PRINTF(1)("Created a %s: %s (0x%8x) from %s\n", created->getClassName(), created->getName(), created->getLeafClassID(), element->Value());
     
    203204      this->localPlayer = new Player();
    204205
     206#if 0
    205207      Playable* playable;
    206208      const std::list<BaseObject*>* playableList = ClassList::getList(CL_PLAYABLE);
     
    215217        playable->setPlayDirection(Quaternion(M_PI, Vector(0.0, 1.0, 0.0)));
    216218      }
     219#endif
    217220    }
    218221    else
     
    244247 
    245248  State::setPlayer(this->localPlayer);
     249 
    246250}
    247251
     
    265269  /* call underlying function */
    266270  GameWorldData::loadScene(root);
     271 
     272  // create server playable
     273  if ( NetworkManager::getInstance()->isGameServer() )
     274  {
     275    NetworkGameManager::getInstance()->signalNewPlayer( 0 );
     276    State::getPlayer()->setPlayable( PlayerStats::getStats( 0 )->getPlayable() );
     277  }
    267278}
    268279
Note: See TracChangeset for help on using the changeset viewer.