[egoboo] Adjust a few function calls for enet 1.3

Bruno Wolff III bruno at fedoraproject.org
Tue Mar 13 02:50:51 UTC 2012


commit aab98c6e269fdeb5ea159ee5e0726f65b07061d5
Author: Bruno Wolff III <bruno at wolff.to>
Date:   Sun Mar 11 13:21:00 2012 -0500

    Adjust a few function calls for enet 1.3

 egoboo-enet13.patch |   36 ++++++++++++++++++++++++++++++++++++
 egoboo.spec         |    2 ++
 2 files changed, 38 insertions(+), 0 deletions(-)
---
diff --git a/egoboo-enet13.patch b/egoboo-enet13.patch
new file mode 100644
index 0000000..3cd8786
--- /dev/null
+++ b/egoboo-enet13.patch
@@ -0,0 +1,36 @@
+--- src/game/network.c.orig	2012-03-11 13:15:43.788996318 -0500
++++ src/game/network.c	2012-03-11 13:19:30.632827004 -0500
+@@ -1845,7 +1845,7 @@
+         log_info( "cl_joinGame: Creating client network connection... " );
+         // Create my host thingamabober
+         /// @todo Should I limit client bandwidth here?
+-        net_myHost = enet_host_create( NULL, 1, 0, 0 );
++        net_myHost = enet_host_create( NULL, 1, 2, 0, 0 );
+         if ( NULL == net_myHost )
+         {
+             // can't create a network connection at all
+@@ -1861,7 +1861,7 @@
+         log_info( "cl_joinGame: Attempting to connect to %s:%d\n", hostname, NET_EGOBOO_PORT );
+         enet_address_set_host( &address, hostname );
+         address.port = NET_EGOBOO_PORT;
+-        net_gameHost = enet_host_connect( net_myHost, &address, NET_EGOBOO_NUM_CHANNELS );
++        net_gameHost = enet_host_connect( net_myHost, &address, NET_EGOBOO_NUM_CHANNELS, 0 );
+         if ( NULL == net_gameHost )
+         {
+             log_info( "cl_joinGame: No available peers to create a connection!\n" );
+@@ -1904,7 +1904,7 @@
+         address.port = NET_EGOBOO_PORT;
+ 
+         log_info( "sv_hostGame: Creating game on port %d\n", NET_EGOBOO_PORT );
+-        net_myHost = enet_host_create( &address, MAX_PLAYER, 0, 0 );
++        net_myHost = enet_host_create( &address, MAX_PLAYER, 2, 0, 0 );
+         if ( NULL == net_myHost )
+         {
+             log_info( "sv_hostGame: Could not create network connection!\n" );
+@@ -2180,4 +2180,4 @@
+     if ( !VALID_PLA( iplayer ) ) return NULL;
+ 
+     return PlaStack.lst + iplayer;
+-}
+\ No newline at end of file
++}
diff --git a/egoboo.spec b/egoboo.spec
index 1a62c49..37bd99b 100644
--- a/egoboo.spec
+++ b/egoboo.spec
@@ -9,6 +9,7 @@ Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.
 Source1:        %{name}.desktop
 Patch0:         egoboo-opts.patch
 Patch1:         egoboo-noenet.patch
+Patch2:         egoboo-enet13.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  SDL_mixer-devel SDL_ttf-devel SDL_image-devel enet-devel
 BuildRequires:  desktop-file-utils
@@ -26,6 +27,7 @@ dimension.
 %setup -q
 %patch0 -b .opts
 %patch1 -b .noenet
+%patch2 -b .enet13
 
 %build
 make -C src


More information about the scm-commits mailing list