summaryrefslogtreecommitdiff
path: root/src/net/manaserv/connection.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-08-02 20:49:37 -0600
committerJared Adams <jaxad0127@gmail.com>2010-08-02 21:02:43 -0600
commit71ea8233334803a079ad24396ead02280a80d8d4 (patch)
treebb41b4c2417ed572dda9cdba93dc7b2e0cedc1c6 /src/net/manaserv/connection.cpp
parent6caf60e9b698a117a8518301f3de65b24e7d876b (diff)
downloadmana-client-71ea8233334803a079ad24396ead02280a80d8d4.tar.gz
mana-client-71ea8233334803a079ad24396ead02280a80d8d4.tar.bz2
mana-client-71ea8233334803a079ad24396ead02280a80d8d4.tar.xz
mana-client-71ea8233334803a079ad24396ead02280a80d8d4.zip
Fix enet version check
Tested-by: BaseBallBoy
Diffstat (limited to 'src/net/manaserv/connection.cpp')
-rw-r--r--src/net/manaserv/connection.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/net/manaserv/connection.cpp b/src/net/manaserv/connection.cpp
index 063c364b..fbd2ed22 100644
--- a/src/net/manaserv/connection.cpp
+++ b/src/net/manaserv/connection.cpp
@@ -60,12 +60,10 @@ 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
+#ifdef ENET_VERSION_MAJOR
mConnection = enet_host_connect(mClient, &enetAddress, 1, 0);
+#else
+ mConnection = enet_host_connect(mClient, &enetAddress, 1);
#endif
if (!mConnection)