summaryrefslogtreecommitdiff
path: root/src/network/network_data.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-01-10 18:56:51 +0000
committerrubidium <rubidium@openttd.org>2007-01-10 18:56:51 +0000
commita7d0cdf95fd8847ab76b35446e1c9b77f8ef1cb7 (patch)
tree1a1c59c13ddb1d152052f3a3a0bcffe4fb531173 /src/network/network_data.cpp
parentce75f6549dd379b506c9f1e9383bd881aa7cf5c7 (diff)
downloadopenttd-a7d0cdf95fd8847ab76b35446e1c9b77f8ef1cb7.tar.xz
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
Diffstat (limited to 'src/network/network_data.cpp')
-rw-r--r--src/network/network_data.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/network/network_data.cpp b/src/network/network_data.cpp
index 9e5e6424d..89011f18d 100644
--- a/src/network/network_data.cpp
+++ b/src/network/network_data.cpp
@@ -9,11 +9,13 @@
#include "network_client.h"
#include "../command.h"
#include "../callback_table.h"
+#include "../helpers.hpp"
// Add a command to the local command queue
void NetworkAddCommandQueue(NetworkClientState *cs, CommandPacket *cp)
{
- CommandPacket* new_cp = malloc(sizeof(*new_cp));
+ CommandPacket* new_cp;
+ MallocT(&new_cp, 1);
*new_cp = *cp;
@@ -29,7 +31,8 @@ void NetworkAddCommandQueue(NetworkClientState *cs, CommandPacket *cp)
// Prepare a DoCommand to be send over the network
void NetworkSend_Command(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback)
{
- CommandPacket *c = malloc(sizeof(CommandPacket));
+ CommandPacket *c;
+ MallocT(&c, 1);
byte temp_callback;
c->player = _local_player;