diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-06-08 21:43:44 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-06-08 21:43:44 +0000 |
| commit | 4919e623c6695a80aaf96187253756dcbb72bf87 (patch) | |
| tree | 948fbcc211b1a8f13e3830853edef6505234bab2 /src/proto.c | |
| parent | a8110d0786e7931715a0d7116ed7d4c23697bdb6 (diff) | |
- kod bol prepisany tak aby dokazal pracovat aj s arenami vascimi ako je obrazovka okna
( ako pozadie na arenu sa da pouzit aj tepeta aj textura )
git-svn-id: http://opensvn.csie.org/tuxanci_ng@62 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/proto.c')
| -rw-r--r-- | src/proto.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/proto.c b/src/proto.c index a31e640..c9aa408 100644 --- a/src/proto.c +++ b/src/proto.c @@ -51,6 +51,16 @@ static void proto_send(int type, client_t *client, char *msg) assert( client != NULL ); sendAllClientBut(msg, client); break; + case PROTO_SEND_ALL_SEES_TUX : + if( client != NULL ) + { + sendAllClientSeesTux(msg, client->tux); + } + else + { + sendAllClientSeesTux(msg, getServerTux()); + } + break; default : assert( ! "Premenna type ma zlu hodnotu !" ); break; @@ -358,13 +368,11 @@ void proto_recv_event_server(client_t *client, char *msg) assert( client != NULL ); assert( msg != NULL ); - sscanf(msg, "%s %d", cmd, &action); - proto_send_event_server(PROTO_SEND_BUT, client, client->tux, action); + proto_send_event_server(PROTO_SEND_ALL_SEES_TUX, client, client->tux, action); actionTux(client->tux, action); - } void proto_send_newtux_server(int type, client_t *client, tux_t *tux) |