- Timestamp:
- Jul 24, 2006, 9:26:31 AM (18 years ago)
- Location:
- branches/proxy/src/lib/network
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/network_stream.cc
r9401 r9402 720 720 // server fakes uniqueid == 0 for handshake 721 721 if ( ( SharedNetworkData::getInstance()->isMasterServer() || SharedNetworkData::getInstance()->isProxyServer() ) && 722 sync.getUniqueID() < SharedNetworkData::getInstance()->getMaxPlayer() + 1)722 sync.getUniqueID() <= SharedNetworkData::getInstance()->getMaxPlayer()) 723 723 n = Converter::intToByteArray( 0, buf + offset, UDP_PACKET_SIZE - offset ); 724 724 else -
branches/proxy/src/lib/network/synchronizeable.cc
r9396 r9402 229 229 else 230 230 hasPermission = false; 231 232 PRINTF(0)("i have |%i| permission to getStateDiff %s\n", hasPermission, (*it)->getName().c_str()); 231 233 232 234 … … 357 359 hasPermission = true; 358 360 // now check OWNER permissions 359 else if( this->owner == SharedNetworkData::getInstance()->getHostID()&& (*it)->checkPermission( PERMISSION_OWNER ))361 else if( this->owner == userId && (*it)->checkPermission( PERMISSION_OWNER )) 360 362 hasPermission = true; 361 363 // now check ALL permissions 362 364 else if( (*it)->checkPermission( PERMISSION_ALL )) 363 365 hasPermission = true; 364 // SPECIAL: get write permissions if i am master server and i am able to overwrite the client stuff365 else if( this->networkStream->isUserMasterServer( userId ) && this->owner != userId&& (*it)->checkPermission( PERMISSION_OWNER ))366 hasPermission = true; 367 // SPECIAL: get write permissions if i am proxy server and i am able to overwrite the client stuff368 else if( this->networkStream->isUserProxyServer( userId ) && this->owner != userId&& (*it)->checkPermission( PERMISSION_OWNER ))366 // SPECIAL: get write permissions if im sending to a master server that does not own this sync 367 else if( this->networkStream->isUserMasterServer( userId ) && this->owner != SharedNetworkData::getInstance()->getHostID() && (*it)->checkPermission( PERMISSION_OWNER )) 368 hasPermission = true; 369 // SPECIAL: get write permissions if im sending to a proxy server that does not own this sync 370 else if( this->networkStream->isUserProxyServer( userId ) && this->owner != SharedNetworkData::getInstance()->getHostID() && (*it)->checkPermission( PERMISSION_OWNER )) 369 371 hasPermission = true; 370 372 else 371 373 hasPermission = false; 374 375 376 PRINTF(0)("i have |%i| permission to write %s\n", hasPermission, (*it)->getName().c_str()); 372 377 373 378 // if it has the permission to write do it
Note: See TracChangeset
for help on using the changeset viewer.