Changeset 7264 in orxonox.OLD for branches/shared_lib/src/orxonox.cc
- Timestamp:
- Apr 2, 2006, 4:51:19 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/shared_lib/src/orxonox.cc
r7261 r7264 54 54 55 55 #include "util/loading/load_param_description.h" 56 #include "util/loading/dynamic_loader.h" 56 57 57 58 #include "network_manager.h" … … 292 293 NetworkManager::getInstance()->establishConnection(this->serverName, port); 293 294 } 294 else if( this->port > 0) { // we are a server 295 else if( this->port > 0) 296 { // we are a server 295 297 State::setOnline(true); 296 298 NetworkManager::getInstance()->createServer(port); … … 300 302 301 303 #include "util/loading/dynamic_loader.h" 302 303 304 /** 304 305 * initializes and loads resource files … … 340 341 ResourceManager::getInstance()->addImageDir(imageDir); 341 342 342 DynamicLoader::loadDyLib("libtest.so"); 343 if (!DynamicLoader::addSearchDirRelative("./world_entities")) 344 if (!DynamicLoader::addSearchDirRelative("./src/world_entities")) 345 DynamicLoader::addSearchDir(PKG_LIBDIR); 346 347 /// FIXME make this more modular (search for himself for all the libraries 348 printf("%s\n", DynamicLoader::getSearchDir()); 349 DynamicLoader::loadDyLib("libORXplayables.la"); 350 DynamicLoader::loadDyLib("libORXweapons.la"); 351 DynamicLoader::loadDyLib("libORXprojectiles.la"); 352 DynamicLoader::loadDyLib("libORXpower_ups.la"); 353 354 DynamicLoader::loadDyLib("libORXenvironmentals.la"); 355 356 DynamicLoader::loadDyLib("libORXnpcs"); 357 358 DynamicLoader::loadDyLib("libORXmisc_entities"); 359 printf("%s\n", DynamicLoader::getSearchDir()); 343 360 344 361 // start the collision detection engine … … 417 434 { 418 435 CmdLinePrefsReader prefs; 419 436 420 437 IniFilePrefsReader ini(ResourceManager::homeDirCheck(DEFAULT_CONFIG_FILE)); 421 438 422 439 prefs.parse(argc, argv); 423 440 424 441 if ( Preferences::getInstance()->getString("misc", "showLicenseAndExit", "") == "1" ) 425 442 { … … 427 444 return 0; 428 445 } 429 446 430 447 if( Preferences::getInstance()->getString("game", "showGui", "") == "1" ) 431 448 showGui = true; … … 433 450 Preferences::getInstance()->getString( "game", "gameType", "" ) == "multiplayer_client" ) 434 451 return startNetworkOrxonox(argc, argv); 435 452 436 453 return startOrxonox(argc, argv, "", -1); 437 454 return 0; … … 449 466 450 467 std::string gameType = Preferences::getInstance()->getString( "game", "gameType", "" ); 451 468 452 469 if ( gameType == "multiplayer_client" ) 453 470 { 454 471 int port = Preferences::getInstance()->getInt( "game", "port", DEFAULT_ORXONOX_PORT ); 455 472 std::string host = Preferences::getInstance()->getString( "game", "host", "" ); 456 473 457 474 if ( host == "" ) 458 475 { … … 460 477 return 1; 461 478 } 462 479 463 480 printf("Starting Orxonox as client: connecting to %s, on port %i\n", host.c_str(), port); 464 481 465 482 startOrxonox(argc, argv, host.c_str(), port); 466 483 } … … 468 485 { 469 486 int port = Preferences::getInstance()->getInt( "game", "port", DEFAULT_ORXONOX_PORT ); 470 487 471 488 printf("Starting Orxonox as server: listening on port %i\n", port); 472 489 473 490 startOrxonox(argc, argv, "", port); 474 491 }
Note: See TracChangeset
for help on using the changeset viewer.