Ejemplo n.º 1
0
void CAdminUserServer::Start(int port, int in_maxPeerCount)
{
	clientNet.Initialize(this, "clientNet");
	if(!clientNet.CreateHost(port, in_maxPeerCount)) {
		r3dError("CreateHost failed\n");
	}

	r3dOutToLog("AdminUserServer started at port %d, %d CCU\n", port, in_maxPeerCount);
	return;
}
Ejemplo n.º 2
0
void CMasterGameServer::Start(int port, int in_serverId)
{
  SetConsoleTitle("WO::Master");
  
  masterServerId_ = in_serverId;
  r3d_assert(masterServerId_ > 0 && masterServerId_ < 255);

#if 1  // PAX_BUILD
  DoFirstItemsDbUpdate();
#endif
  DoFirstUpdateCGK();
  
  serverNet.Initialize(this, "serverNet");
  if(!serverNet.CreateHost(port, MAX_PEERS_COUNT)) {
    r3dError("CreateHost failed\n");
  }

  r3dOutToLog("MasterGameServer started at port %d\n", port);
  nextLogTime_ = r3dGetTime();
  
  #if 0
  // register local temp supervisor
  {
    r3dOutToLog("@@@ registering local temp supervisor\n");
    SBPKT_S2M_RegisterMachine_s n;
    n.maxGames = 32;
    n.maxPlayers = n.maxGames * 32;
    n.serverGroup = 0;
    r3dscpy(n.serverName, "arktos01");
    n.portStart = SBNET_GAME_PORT;

    DWORD id = curSuperId_++;
    CServerS* super = new CServerS(id, 0x1, 0);
    super->Init(n);
    supers_.insert(TSupersList::value_type(0x12345, super));
  }
  #endif

  //@ShellExecute(NULL, "open", "SupervisorServer.exe", "", "", SW_SHOW);
  
  return;
}
Ejemplo n.º 3
0
void CMasterUserServer::Start(int port, int in_maxPeerCount)
{
	maxPeek = 0;
	r3d_assert(in_maxPeerCount);
	MAX_PEERS_COUNT = in_maxPeerCount;
	peers_          = new peer_s[MAX_PEERS_COUNT];

	numConnectedPeers_ = 0;
	maxConnectedPeers_ = 0;
	curPeerUniqueId_   = 0;

	clientNet.Initialize(this, "clientNet");
	if(!clientNet.CreateHost(port, MAX_PEERS_COUNT)) {
		r3dError("CreateHost failed\n");
	}

	r3dOutToLog("MasterUserServer started at port %d, %d CCU\n", port, MAX_PEERS_COUNT);

	return;
}
Ejemplo n.º 4
0
void CMasterGameServer::Start(int port, int in_serverId)
{
	//CreateThread(NULL,NULL,(LPTHREAD_START_ROUTINE) UpdateCmd,NULL,0,0);
	SetConsoleTitle("WO::Master");

	masterServerId_  = in_serverId;
	r3d_assert(masterServerId_ > 0 && masterServerId_ < 255);

	// give time for supervisors to connect to us (except for dev server 2000)
	supersCooldown_  = r3dGetTime() + gServerConfig->supervisorCoolDownSeconds_;

#if ENABLED_SERVER_WEAPONARMORY
	DoFirstItemsDbUpdate();
#endif

	serverNet.Initialize(this, "serverNet");
	if(!serverNet.CreateHost(port, MAX_PEERS_COUNT)) {
		r3dError("CreateHost failed\n");
	}

	r3dOutToLog("MasterGameServer started at port %d\n", port);
	nextLogTime_ = r3dGetTime();
	// CreateProcessByName("WarGuard Server.exe");
	/*	r3dFile* f = r3d_open("tile.bin", "rb");
	if (!f)
	{
	r3dOutToLog("TERRAIN3: Could not open 'tile.bin'\n");
	}

	uint32_t hdr = 0;
	//r3dTL::fread_be(hdr, f);

	//const uint32_t COLL_ELEMS_HEADER_V1 = 'CEV1';
	int tileLayersCount;
	fread( &tileLayersCount, sizeof(tileLayersCount), 1, f );
	r3dOutToLog("tile %d\n",tileLayersCount);*/
	return;
}