Fix build after update of net/enet
Reported by: pav
This commit is contained in:
parent
aa05f944a4
commit
2d5f04b621
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=285256
@ -1,6 +1,27 @@
|
||||
--- client.cpp.orig Tue Feb 6 01:24:56 2007
|
||||
+++ client.cpp Tue Feb 6 01:26:30 2007
|
||||
@@ -86,7 +86,7 @@
|
||||
--- client.cpp.orig 2011-11-07 18:39:52.000000000 +0100
|
||||
+++ client.cpp 2011-11-07 18:55:26.000000000 +0100
|
||||
@@ -63,12 +63,18 @@
|
||||
conoutf("could not resolve server %s", servername);
|
||||
return;
|
||||
};
|
||||
-
|
||||
+#if ENET_VERSION > 130
|
||||
+ clienthost = enet_host_create(NULL, 1, 0, rate, rate);
|
||||
+#else
|
||||
clienthost = enet_host_create(NULL, 1, rate, rate);
|
||||
-
|
||||
+#endif
|
||||
if(clienthost)
|
||||
{
|
||||
+#if ENET_VERSION > 130
|
||||
+ enet_host_connect(clienthost, &address, 1, 0);
|
||||
+#else
|
||||
enet_host_connect(clienthost, &address, 1);
|
||||
+#endif
|
||||
enet_host_flush(clienthost);
|
||||
connecting = lastmillis;
|
||||
connattempts = 0;
|
||||
@@ -86,7 +92,7 @@
|
||||
{
|
||||
if(!connecting && !disconnecting)
|
||||
{
|
||||
@ -9,7 +30,7 @@
|
||||
enet_host_flush(clienthost);
|
||||
disconnecting = lastmillis;
|
||||
};
|
||||
@@ -304,6 +304,9 @@
|
||||
@@ -304,6 +310,9 @@
|
||||
if(disconnecting) disconnect();
|
||||
else server_err();
|
||||
return;
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- server.cpp.orig 2007-08-03 15:52:35.000000000 +0200
|
||||
+++ server.cpp 2007-08-03 15:58:58.000000000 +0200
|
||||
--- server.cpp.orig 2011-11-07 18:57:19.000000000 +0100
|
||||
+++ server.cpp 2011-11-07 19:01:52.000000000 +0100
|
||||
@@ -104,7 +104,7 @@
|
||||
void disconnect_client(int n, char *reason)
|
||||
{
|
||||
@ -35,3 +35,15 @@
|
||||
};
|
||||
|
||||
if(numplayers>maxclients)
|
||||
@@ -448,7 +451,11 @@
|
||||
{
|
||||
ENetAddress address = { ENET_HOST_ANY, CUBE_SERVER_PORT };
|
||||
if(*ip && enet_address_set_host(&address, ip)<0) printf("WARNING: server ip not resolved");
|
||||
+#if ENET_VERSION > 130
|
||||
+ serverhost = enet_host_create(&address, MAXCLIENTS, 0, 0, uprate);
|
||||
+#else
|
||||
serverhost = enet_host_create(&address, MAXCLIENTS, 0, uprate);
|
||||
+#endif
|
||||
if(!serverhost) fatal("could not create server host\n");
|
||||
loopi(MAXCLIENTS) serverhost->peers[i].data = (void *)-1;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user