Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9541 in orxonox.OLD for branches/proxy/src/lib/network/proxy


Ignore:
Timestamp:
Jul 28, 2006, 10:33:34 AM (18 years ago)
Author:
patrick
Message:

discovered a bug in the client id assignement algorithm. corrected. proxy control center should work now. testing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/lib/network/proxy/proxy_control.cc

    r9540 r9541  
    2121#include "state.h"
    2222#include "shared_network_data.h"
     23#include "network_game_manager.h"
    2324
    2425#include "converter.h"
     
    103104bool ProxyControl::messageHandlerNewClient( MessageType messageType, byte * data, int dataLength, void * someData, int senderId, int destinationId  )
    104105{
    105   PRINTF(0)("Got Signal: new player arrived\n");
     106  int userId;
     107  // body data length correct?
     108  if ( dataLength != INTSIZE )
     109  {
     110    PRINTF(2)("new client message has wrong size: %d\n", dataLength );
     111    return true;
     112  }
     113  // read the userId fromt he message body
     114  assert( Converter::byteArrayToInt( data, &userId) == INTSIZE );
     115
     116  PRINTF(0)("Got Signal: new player arrived with userId: %i\n", userId);
    106117  // part for the master server
    107118  if( SharedNetworkData::getInstance()->isMasterServer())
    108119  {
    109 
     120    // we now create the new player ship and stuff...
     121    NetworkGameManager::getInstance()->signalNewPlayer(userId);
    110122  }
    111123  else if(SharedNetworkData::getInstance()->isProxyServerActive())
Note: See TracChangeset for help on using the changeset viewer.