From 617ba439aab5f1798eb02618dfcfbed80a5baf28 Mon Sep 17 00:00:00 2001 From: oroborus Date: Sun, 30 Mar 2008 16:51:15 +0000 Subject: - polozky casovaca sa nachadzaju v zozname list_t , ktory he sucastou arena_t - pri bonuse neviditelnost sa neda podvadzat modifikovanim clienta - o vystreli sa stara server, ich suradnicu a dalsie info posiela server clientom - parametre sa pisu vo forme --env=val git-svn-id: http://opensvn.csie.org/tuxanci_ng@38 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e --- src/proto.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/proto.c') diff --git a/src/proto.c b/src/proto.c index 38f8ee0..bb1a14c 100644 --- a/src/proto.c +++ b/src/proto.c @@ -265,11 +265,23 @@ void proto_recv_event_server(client_t *client, char *msg) void proto_send_newtux_server(int type, client_t *client, tux_t *tux) { char msg[STR_PROTO_SIZE]; + int x, y; assert( tux != NULL ); + if( tux->bonus == BONUS_HIDDEN ) + { + x = -100; + y = -100; + } + else + { + x = tux->x; + y = tux->y; + } + sprintf(msg, "newtux %d %d %d %d %d %d %d %s %d %d %d %d %d %d %d %d %d %d %d\n", - tux->id ,tux->x, tux->y, tux->status, tux->position ,tux->frame, tux->score, tux->name, + tux->id ,x, y, tux->status, tux->position ,tux->frame, tux->score, tux->name, tux->gun, tux->bonus, tux->shot[GUN_SIMPLE], tux->shot[GUN_DUAL_SIMPLE], tux->shot[GUN_SCATTER], tux->shot[GUN_TOMMY], tux->shot[GUN_LASSER], tux->shot[GUN_MINE], tux->shot[GUN_BOMBBALL], @@ -310,6 +322,7 @@ void proto_recv_newtux_client(char *msg) } tux->id = id; + tux->x = x; tux->y = y; tux->status = status; -- cgit v1.2.3