Changeset 6892 in orxonox.OLD for branches/network/src/lib
- Timestamp:
- Jan 31, 2006, 2:28:45 PM (19 years ago)
- Location:
- branches/network/src/lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/coord/p_node.cc
r6815 r6892 1253 1253 SYNCHELP_WRITE_BEGIN(); 1254 1254 1255 if ( this->getHostID()!= this->getOwner() )1255 if ( this->getHostID()!=0 && this->getHostID()!=this->getOwner() ) 1256 1256 { 1257 1257 return SYNCHELP_WRITE_N; … … 1272 1272 1273 1273 SYNCHELP_WRITE_BYTE( flags, NWT_PN_FLAGS ); 1274 //PRINTF(0)("FLAGS = %d\n", flags);1274 PRINTF(0)("FLAGS = %d\n", flags); 1275 1275 1276 1276 if ( flags & __FLAG_COOR ) 1277 1277 { 1278 1278 1279 //PRINTF(0)("SEND COOR: %f %f %f\n", this->relCoordinate.x, this->relCoordinate.y, this->relCoordinate.z);1279 PRINTF(0)("SEND COOR: %f %f %f\n", this->relCoordinate.x, this->relCoordinate.y, this->relCoordinate.z); 1280 1280 1281 1281 SYNCHELP_WRITE_FLOAT( this->relCoordinate.x, NWT_PN_SCOORX ); … … 1291 1291 { 1292 1292 1293 //PRINTF(0)("SEND QUAT: %f %f %f %f\n", this->absDirection.w, this->absDirection.v.x, this->absDirection.v.y, this->absDirection.v.z);1293 PRINTF(0)("SEND QUAT: %f %f %f %f\n", this->absDirection.w, this->absDirection.v.x, this->absDirection.v.y, this->absDirection.v.z); 1294 1294 1295 1295 SYNCHELP_WRITE_FLOAT( this->absDirection.w, NWT_PN_SROTV ); -
branches/network/src/lib/network/network_game_manager.cc
r6868 r6892 895 895 i += Converter::byteArrayToInt( &data[i], &uniqueID ); 896 896 897 PRINTF(0)("handleRequestSync %d %d\n", uniqueID, sender); 897 898 doRequestSync( uniqueID, sender ); 898 899 … … 980 981 void NetworkGameManager::executeRequestSync( int uniqueID, int user ) 981 982 { 983 PRINTF(0)("executeRequestSync %d %d\n", uniqueID, user); 982 984 if ( user >= outBuffer.size() ) 983 985 resizeBufferVector( user ); -
branches/network/src/lib/network/network_stream.cc
r6868 r6892 231 231 int reciever; 232 232 Header header; 233 int counter; 234 233 235 for (SynchronizeableList::iterator it = synchronizeables.begin(); it!=synchronizeables.end(); it++) 234 236 { 237 counter = 0; 238 235 239 if ( (*it)!=NULL && (*it)->beSynchronized() /*&& (*it)->getOwner() == myHostId*/ ) 236 240 { 237 241 do { 242 counter++; 243 244 //check for endless loop 245 if ( counter > 50 ) 246 { 247 PRINTF(1)("there seems to be an error in readBytes of %s\n", (*it)->getClassName()); 248 assert(false); 249 } 250 238 251 reciever = 0; 239 252 dataLength = (*it)->readBytes(downBuffer, DATA_STREAM_BUFFER_SIZE, &reciever); 240 241 253 242 254 if ( dataLength<=0 ){ … … 267 279 for ( int i = 0; i<networkSockets.size(); i++) 268 280 { 269 if ( i!= -reciever&& networkSockets[i] != NULL )281 if ( i!=abs(reciever) && networkSockets[i] != NULL ) 270 282 { 271 PRINTF( 5)("write %d bytes to socket %d\n", dataLength, i);283 PRINTF(0)("write %d bytes to socket %d uniqueid %d reciever %d\n", dataLength, i, (*it)->getUniqueID(), reciever); 272 284 networkSockets[i]->writePacket(downBuffer, dataLength); 273 285 }
Note: See TracChangeset
for help on using the changeset viewer.