summaryrefslogtreecommitdiff
path: root/src/net/network.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/network.cpp')
-rw-r--r--src/net/network.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/net/network.cpp b/src/net/network.cpp
index dcfbc8f1..39a632a2 100644
--- a/src/net/network.cpp
+++ b/src/net/network.cpp
@@ -29,6 +29,8 @@
#include "../log.h"
+Network *network;
+
Network::Network():
mClient(0), mServer(0),
mAddress(), mPort(0),
@@ -216,7 +218,7 @@ void Network::flush()
}
}
-void Network::send(MessageOut *msg)
+void Network::send(const MessageOut &msg)
{
if (mState == IDLE || mState == NET_ERROR)
{
@@ -225,8 +227,8 @@ void Network::send(MessageOut *msg)
return;
}
- ENetPacket *packet = enet_packet_create(msg->getData(),
- msg->getDataSize(),
+ ENetPacket *packet = enet_packet_create(msg.getData(),
+ msg.getDataSize(),
ENET_PACKET_FLAG_RELIABLE);
mOutgoingPackets.push(packet);
}