Changeset 6463 in orxonox.OLD for branches/network
- Timestamp:
- Jan 10, 2006, 1:56:38 PM (19 years ago)
- Location:
- branches/network/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/network/network_game_manager.cc
r6459 r6463 478 478 PRINTF(0)("Fabricated %s with id %d\n", s->getClassName(), s->getUniqueID()); 479 479 480 481 if( !strcmp( s->getClassName(), "SkyBox"))482 {483 PRINTF(0)("==> Created the Sky!\n");484 (dynamic_cast<GameWorld*>(State::getCurrentStoryEntity()))->setSky( dynamic_cast<WorldEntity*>(s) );485 }486 // this->sky = dynamic_cast<WorldEntity*>(created);487 if( !strcmp( s->getClassName(), "Terrain"))488 {489 PRINTF(0)("==> Created the Terrain\n");490 // this->terrain = dynamic_cast<Terrain*>(created);491 // CDEngine::getInstance()->setTerrain(terrain);492 }493 494 480 return b; 495 481 } -
branches/network/src/story_entities/multi_player_world.cc
r6424 r6463 21 21 #include "factory.h" 22 22 #include "load_param.h" 23 #include "shell_command.h" 23 24 24 25 #include "network_manager.h" … … 26 27 27 28 using namespace std; 29 30 31 //! Register a command to print some multiplayer world infos 32 SHELL_COMMAND(debug, MultiPlayerWorld, debug); 28 33 29 34 … … 79 84 } 80 85 86 87 /** 88 * some debug ouptut - shell command 89 */ 90 void MultiPlayerWorld::debug() 91 { 92 ((MultiPlayerWorldData*)this->dataTank)->debug(); 93 } -
branches/network/src/story_entities/multi_player_world.h
r6424 r6463 27 27 void loadParams(const TiXmlElement* root); 28 28 29 void debug(); 30 29 31 protected: 30 32 virtual void synchronize(); -
branches/network/src/story_entities/multi_player_world_data.cc
r6462 r6463 187 187 } 188 188 189 /* some debug output */190 PRINT(0)("==================================================\n");191 std::list<BaseObject*>::const_iterator entity;192 for (entity = playableList->begin(); entity != playableList->end(); entity++)193 {194 PRINTF(0)("Got a playable, class: %s, name: %s\n", (*entity)->getClassName(), (*entity)->getName());195 }196 197 198 PNode* cam = State::getCameraTarget();199 PRINT(0)("Camera has target - class: %s, name: %s, uid: %i\n", cam->getClassName(), cam->getName(), cam->getUniqueID());200 201 202 PRINT(0)("==================================================\n");203 204 205 189 /* init the pnode tree */ 206 190 PNode::getNullParent()->init(); … … 239 223 } 240 224 225 226 /** 227 * some debug output 228 */ 229 void MultiPlayerWorldData::debug() 230 { 231 PRINT(0)("==================================================\n"); 232 Playable* playable; 233 const std::list<BaseObject*>* playableList = ClassList::getList(CL_PLAYABLE); 234 assert(playableList != NULL); 235 std::list<BaseObject*>::const_iterator entity; 236 for (entity = playableList->begin(); entity != playableList->end(); entity++) 237 { 238 Playable* p = dynamic_cast<Playable*>(*entity); 239 PRINTF(0)("Got a playable, class: %s, name: %s, uid: %i\n", (*entity)->getClassName(), (*entity)->getName(), p->getUniqueID()); 240 } 241 242 PNode* cam = State::getCameraTarget(); 243 PRINT(0)("Camera has target - class: %s, name: %s, uid: %i\n", cam->getClassName(), cam->getName(), cam->getUniqueID()); 244 245 PRINT(0)("==================================================\n"); 246 247 } 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 -
branches/network/src/story_entities/multi_player_world_data.h
r6424 r6463 24 24 virtual ErrorMessage init(); 25 25 26 void debug(); 27 26 28 27 29 protected: -
branches/network/src/world_entities/space_ships/space_ship.cc
r6426 r6463 211 211 dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( true); 212 212 this->attachCamera(); 213 214 215 213 } 216 214 … … 315 313 316 314 //readjust 317 315 318 316 /* 319 317 In the game "Yager" the spaceship gets readjusted when the player moves the mouse. 320 318 I (bknecht) go and check it out how they do it, we could probably use this also in Orxonox. 321 319 */ 322 //if (xMouse != 0 && yMouse != 0) 323 320 //if (xMouse != 0 && yMouse != 0) 321 324 322 //if (this->getAbsDirZ().y > 0.1) this->shiftDir(Quaternion(time*0.3, Vector(1,0,0))); 325 323 //else if (this->getAbsDirZ().y < -0.1) this->shiftDir(Quaternion(-time*0.3, Vector(1,0,0)));
Note: See TracChangeset
for help on using the changeset viewer.