From 1438b79069821cba744a4ea4739324560be64fb6 Mon Sep 17 00:00:00 2001 From: oroborus Date: Sun, 9 Mar 2008 21:36:26 +0000 Subject: - pridany doomovsky adresar - moznost ulozit nastavenie - tabulka najlepsich - zabytie protigraca minou sa rata do bodov supera git-svn-id: http://opensvn.csie.org/tuxanci_ng@13 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e --- src/net_multiplayer.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/net_multiplayer.c') diff --git a/src/net_multiplayer.c b/src/net_multiplayer.c index 536474a..3db7572 100644 --- a/src/net_multiplayer.c +++ b/src/net_multiplayer.c @@ -340,8 +340,15 @@ void proto_recv_deltux_client(char *msg) void proto_send_additem_server(item_t *p) { char msg[STR_SIZE]; - - sprintf(msg, "additem %d %d %d %d %d\n", p->type, p->x, p->y, p->count, p->frame); + int id = -1; + + if( p->author != NULL ) + { + id = p->author->id; + } + + sprintf(msg, "additem %d %d %d %d %d %d\n", + p->type, p->x, p->y, p->count, p->frame, id); sendAllClient(msg); } @@ -349,12 +356,12 @@ void proto_send_additem_server(item_t *p) void proto_recv_additem_client(char *msg) { char cmd[STR_SIZE]; - int type, x, y, count, frame; + int type, x, y, count, frame, id; item_t *item; - sscanf(msg, "%s %d %d %d %d %d\n", cmd, &type, &x, &y, &count, &frame); + sscanf(msg, "%s %d %d %d %d %d %d\n", cmd, &type, &x, &y, &count, &frame, &id); - item = newItem(x, y, type); + item = newItem(x, y, type, getTuxID(arena->listTux, id)); if( isConflictWithListItem(arena->listItem, item->x, item->y, item->w, item->h) ) { -- cgit v1.2.3