Changeset 1379 for code/branches/network
- Timestamp:
- May 22, 2008, 4:35:11 PM (17 years ago)
- Location:
- code/branches/network
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/bin/keybindings.ini
r1364 r1379 1 1 [KeyBinder] 2 2 KeyUNASSIGNED= 3 KeyESCAPE= 3 KeyESCAPE=exit 4 4 Key1= 5 5 Key2= -
code/branches/network/src/network/ConnectionManager.cc
r1378 r1379 70 70 bindAddress.host = ENET_HOST_ANY; 71 71 bindAddress.port = NETWORK_PORT; 72 head_ = head; 73 } 74 75 ConnectionManager::ConnectionManager(ClientInformation *head, int port){ 76 quit=false; 77 bindAddress.host = ENET_HOST_ANY; 78 bindAddress.port = port; 72 79 head_ = head; 73 80 } -
code/branches/network/src/network/ConnectionManager.h
r1378 r1379 74 74 ConnectionManager(); 75 75 ConnectionManager(ClientInformation *head); 76 ConnectionManager(ClientInformation *head, int port); 76 77 ConnectionManager(int port, const char *address, ClientInformation *head); 77 78 ConnectionManager(int port, std::string address, ClientInformation *head); -
code/branches/network/src/network/Server.cc
r1360 r1379 66 66 clients = new ClientInformation(true); 67 67 connection = new ConnectionManager(clients); 68 gamestates = new GameStateManager(clients); 69 } 70 71 Server::Server(int port){ 72 packet_gen = PacketGenerator(); 73 clients = new ClientInformation(true); 74 connection = new ConnectionManager(clients, port); 68 75 gamestates = new GameStateManager(clients); 69 76 } -
code/branches/network/src/network/Server.h
r1293 r1379 60 60 public: 61 61 Server(); 62 Server(int port); 62 63 Server(int port, std::string bindAddress); 63 64 Server(int port, const char *bindAddress); -
code/branches/network/src/orxonox/Orxonox.cc
r1362 r1379 170 170 timefactor_(1.0f), 171 171 mode_(STANDALONE), 172 serverIp_("") 172 serverIp_(""), 173 serverPort_(NETWORK_PORT) 173 174 { 174 175 } … … 244 245 ar.checkArgument("data", dataPath, false); 245 246 ar.checkArgument("ip", serverIp_, false); 247 ar.checkArgument("port", serverPort_, false); 246 248 if(ar.errorHandling()) 247 249 return false; … … 357 359 ib->registerListener(console, &Testconsole::execute, '\r', false); 358 360 ib->registerListener(console, &Testconsole::hintandcomplete, '\t', true); 359 ib->registerListener(console, &Testconsole::clear, ' §', true);361 ib->registerListener(console, &Testconsole::clear, '�', true); 360 362 ib->registerListener(console, &Testconsole::removeLast, '\b', true); 361 363 ib->registerListener(console, &Testconsole::exit, (char)0x1B, true); … … 365 367 ib->registerListener(orxonoxConsole_, &InGameConsole::execute, '\r', false); 366 368 ib->registerListener(orxonoxConsole_, &InGameConsole::hintandcomplete, '\t', true); 367 ib->registerListener(orxonoxConsole_, &InGameConsole::clear, ' §', true);369 ib->registerListener(orxonoxConsole_, &InGameConsole::clear, '�', true); 368 370 ib->registerListener(orxonoxConsole_, &InGameConsole::removeLast, '\b', true); 369 371 ib->registerListener(orxonoxConsole_, &InGameConsole::exit, (char)0x1B, true); … … 379 381 COUT(2) << "Loading level in server mode" << std::endl; 380 382 381 server_g = new network::Server( );383 server_g = new network::Server(serverPort_); 382 384 383 385 if (!loadScene()) … … 399 401 client_g = network::Client::createSingleton(); 400 402 else 401 client_g = network::Client::createSingleton(serverIp_, NETWORK_PORT); 403 404 client_g = network::Client::createSingleton(serverIp_, serverPort_); 402 405 403 406 client_g->establishConnection(); -
code/branches/network/src/orxonox/Orxonox.h
r1293 r1379 105 105 gameMode mode_; 106 106 std::string serverIp_; 107 int serverPort_; 107 108 108 109 static Orxonox *singletonRef_s;
Note: See TracChangeset
for help on using the changeset viewer.