Changeset 8068 in orxonox.OLD for trunk/src/story_entities
- Timestamp:
- Jun 1, 2006, 2:28:16 PM (19 years ago)
- Location:
- trunk/src/story_entities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/story_entities/multi_player_world.cc
r7954 r8068 22 22 #include "util/loading/load_param.h" 23 23 #include "shell_command.h" 24 25 #include "cd_engine.h" 24 26 25 27 #include "network_manager.h" … … 86 88 87 89 /** 90 * kicks the CDEngine to detect the collisions between the object groups in the world 91 */ 92 void 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 /** 88 115 * some debug ouptut - shell command 89 116 */ -
trunk/src/story_entities/multi_player_world.h
r6512 r8068 31 31 protected: 32 32 virtual void synchronize(); 33 virtual void collisionDetection(); 33 34 }; 34 35 -
trunk/src/story_entities/multi_player_world_data.cc
r7954 r8068 45 45 #include "network_manager.h" 46 46 #include "network_game_manager.h" 47 #include "player_stats.h" 47 48 48 49 … … 146 147 { 147 148 /* pass the entity to the NetworkGameManager to be created */ 148 BaseObject* created = NetworkGameManager::getInstance()->createEntity(element);149 BaseObject* created = Factory::fabricate(element); 149 150 if( created != NULL ) 150 151 PRINTF(1)("Created a %s: %s (0x%8x) from %s\n", created->getClassName(), created->getName(), created->getLeafClassID(), element->Value()); … … 203 204 this->localPlayer = new Player(); 204 205 206 #if 0 205 207 Playable* playable; 206 208 const std::list<BaseObject*>* playableList = ClassList::getList(CL_PLAYABLE); … … 215 217 playable->setPlayDirection(Quaternion(M_PI, Vector(0.0, 1.0, 0.0))); 216 218 } 219 #endif 217 220 } 218 221 else … … 244 247 245 248 State::setPlayer(this->localPlayer); 249 246 250 } 247 251 … … 265 269 /* call underlying function */ 266 270 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 } 267 278 } 268 279
Note: See TracChangeset
for help on using the changeset viewer.