diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-03-09 21:36:26 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-03-09 21:36:26 +0000 |
| commit | 1438b79069821cba744a4ea4739324560be64fb6 (patch) | |
| tree | 1229b2aca2937be2e838fb2d787ab31d83cd59c7 /src/net_multiplayer.c | |
| parent | da85e88878251f6a980fef95bd47109169a3cf7c (diff) | |
- 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
Diffstat (limited to 'src/net_multiplayer.c')
| -rw-r--r-- | src/net_multiplayer.c | 17 |
1 files changed, 12 insertions, 5 deletions
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) ) { |