diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-08-02 15:26:06 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-08-02 15:42:42 -0600 |
commit | 0cc6b3bde2d9d041cf8c616941a11273dae2aff5 (patch) | |
tree | 0a36e056ace3d38e76c7a5a6306754ed258077af /src/net/manaserv/connection.cpp | |
parent | 42f6993e0deacc857302f48004031dd45b739874 (diff) | |
download | mana-0cc6b3bde2d9d041cf8c616941a11273dae2aff5.tar.gz mana-0cc6b3bde2d9d041cf8c616941a11273dae2aff5.tar.bz2 mana-0cc6b3bde2d9d041cf8c616941a11273dae2aff5.tar.xz mana-0cc6b3bde2d9d041cf8c616941a11273dae2aff5.zip |
Add support for enet 1.3
Reviewed-by: Yohann Ferreira
Diffstat (limited to 'src/net/manaserv/connection.cpp')
-rw-r--r-- | src/net/manaserv/connection.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/net/manaserv/connection.cpp b/src/net/manaserv/connection.cpp index 98076c8a..063c364b 100644 --- a/src/net/manaserv/connection.cpp +++ b/src/net/manaserv/connection.cpp @@ -60,7 +60,13 @@ bool Connection::connect(const std::string &address, short port) enetAddress.port = port; // Initiate the connection, allocating channel 0. +#if ENET_VERSION_MAJOR != 1 +#error Unsuported enet version! +#elif ENET_VERSION_MINOR < 3 mConnection = enet_host_connect(mClient, &enetAddress, 1); +#else + mConnection = enet_host_connect(mClient, &enetAddress, 1, 0); +#endif if (!mConnection) { |