diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2006-08-14 08:36:16 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2006-08-14 08:36:16 +0000 |
commit | c79bf8c82f0a38b574b83be2484eb347852cd833 (patch) | |
tree | bf13ca5f0ff3f0413bab52f89ba95e705ffce745 /src/net/network.cpp | |
parent | 9e6862623370f53d1b78e4bd167152b840e28884 (diff) | |
download | mana-c79bf8c82f0a38b574b83be2484eb347852cd833.tar.gz mana-c79bf8c82f0a38b574b83be2484eb347852cd833.tar.bz2 mana-c79bf8c82f0a38b574b83be2484eb347852cd833.tar.xz mana-c79bf8c82f0a38b574b83be2484eb347852cd833.zip |
Completed porting of character creation/deletion, fixed some issues with network code.
Diffstat (limited to 'src/net/network.cpp')
-rw-r--r-- | src/net/network.cpp | 8 |
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); } |