Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8068 in orxonox.OLD for trunk/src/story_entities


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

trunk: merged the network branche back to trunk

Location:
trunk/src/story_entities
Files:
3 edited

Legend:

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

    r7954 r8068  
    2222#include "util/loading/load_param.h"
    2323#include "shell_command.h"
     24
     25#include "cd_engine.h"
    2426
    2527#include "network_manager.h"
     
    8688
    8789/**
     90 * kicks the CDEngine to detect the collisions between the object groups in the world
     91 */
     92void MultiPlayerWorld::collisionDetection()
     93{
     94  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_PLAYERS),
     95    this->dataTank->objectManager->getObjectList(OM_PLAYERS));
     96  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_PLAYERS),
     97    this->dataTank->objectManager->getObjectList(OM_PLAYERS_PROJ));
     98
     99  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_00),
     100    this->dataTank->objectManager->getObjectList(OM_GROUP_01_PROJ));
     101  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_01),
     102    this->dataTank->objectManager->getObjectList(OM_GROUP_00_PROJ));
     103  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_00),
     104    this->dataTank->objectManager->getObjectList(OM_GROUP_01));
     105
     106  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_00),
     107    this->dataTank->objectManager->getObjectList(OM_COMMON));
     108  CDEngine::getInstance()->checkCollisions(this->dataTank->objectManager->getObjectList(OM_GROUP_01),
     109    this->dataTank->objectManager->getObjectList(OM_COMMON));
     110
     111}
     112
     113
     114/**
    88115 * some debug ouptut - shell command
    89116 */
  • trunk/src/story_entities/multi_player_world.h

    r6512 r8068  
    3131  protected:
    3232    virtual void synchronize();
     33    virtual void collisionDetection();
    3334};
    3435
  • 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.