[Orxonox-commit 332] r2953 - branches/netp2/src/network
scheusso at orxonox.net
scheusso at orxonox.net
Mon May 4 17:04:58 CEST 2009
Author: scheusso
Date: 2009-05-04 17:04:58 +0200 (Mon, 04 May 2009)
New Revision: 2953
Modified:
branches/netp2/src/network/ConnectionManager.cc
branches/netp2/src/network/Server.cc
Log:
some changes for testing purpose
Modified: branches/netp2/src/network/ConnectionManager.cc
===================================================================
--- branches/netp2/src/network/ConnectionManager.cc 2009-05-04 14:34:48 UTC (rev 2952)
+++ branches/netp2/src/network/ConnectionManager.cc 2009-05-04 15:04:58 UTC (rev 2953)
@@ -189,14 +189,15 @@
}
event = new ENetEvent;
- while(!quit){
+ while(!quit)
+ {
{ //mutex scope
boost::recursive_mutex::scoped_lock lock(enet_mutex_g);
if(enet_host_service(server, event, NETWORK_WAIT_TIMEOUT)<0){
// we should never reach this point
- assert(0);
quit=true;
continue;
+ printf("waaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaahhhhhhhhhhhhhhhh");
// add some error handling here ========================
}
lock.unlock();
@@ -204,6 +205,7 @@
switch(event->type){
// log handling ================
case ENET_EVENT_TYPE_CONNECT:
+ printf("====================================================================");
case ENET_EVENT_TYPE_DISCONNECT:
case ENET_EVENT_TYPE_RECEIVE:
processData(event);
Modified: branches/netp2/src/network/Server.cc
===================================================================
--- branches/netp2/src/network/Server.cc 2009-05-04 14:34:48 UTC (rev 2952)
+++ branches/netp2/src/network/Server.cc 2009-05-04 15:04:58 UTC (rev 2953)
@@ -154,13 +154,13 @@
void Server::tick(float time) {
processQueue();
//this steers our network frequency
- timeSinceLastUpdate_+=time;
- if(timeSinceLastUpdate_>=NETWORK_PERIOD){
+// timeSinceLastUpdate_+=time;
+// if(timeSinceLastUpdate_>=NETWORK_PERIOD){
timeSinceLastUpdate_ -= static_cast<unsigned int>( timeSinceLastUpdate_ / NETWORK_PERIOD ) * NETWORK_PERIOD;
gamestates_->processGamestates();
updateGamestate();
FunctionCallManager::sendCalls();
- }
+// }
}
bool Server::queuePacket(ENetPacket *packet, int clientID){
More information about the Orxonox-commit
mailing list