519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
|
if (isdedicated = dedicated) {
ENetAddress address = {ENET_HOST_ANY, CUBE_SERVER_PORT};
if (*ip && enet_address_set_host(&address, ip) < 0)
printf("WARNING: server ip not resolved");
serverhost = enet_host_create(&address, MAXCLIENTS, 0, uprate);
if (!serverhost)
fatal("could not create server host\n");
loopi(MAXCLIENTS) serverhost->peers[i].data = (void *)-1;
};
resetserverifempty();
if (isdedicated) // do not return, this becomes main loop
{
#ifdef _WIN32
SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS);
|
|
<
>
|
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
|
if (isdedicated = dedicated) {
ENetAddress address = {ENET_HOST_ANY, CUBE_SERVER_PORT};
if (*ip && enet_address_set_host(&address, ip) < 0)
printf("WARNING: server ip not resolved");
serverhost = enet_host_create(&address, MAXCLIENTS, 0, uprate);
if (!serverhost)
fatal(@"could not create server host\n");
loopi(MAXCLIENTS) serverhost->peers[i].data = (void *)-1;
}
resetserverifempty();
if (isdedicated) // do not return, this becomes main loop
{
#ifdef _WIN32
SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS);
|