From 20ecf36f401adad01cc5ff67e411c596a8b523d5 Mon Sep 17 00:00:00 2001 From: oroborus Date: Sat, 22 Mar 2008 22:13:43 +0000 Subject: - oprava chyby, client ktory checkuje status moze zhodit server - oprava chyby s minami, v sietovom multiplayeri - server si kontroluje cas kedy naposledy komunikval s clientom po kazdom prijati datagramu, nie iba po kazdom datagrame s pingom - bod sa pripocitava aj tuxovy, ktory dal do areny minu a vybuch s miny odpalenej strielov zabyje niekho ineho ako je on - drobne upravy v kode git-svn-id: http://opensvn.csie.org/tuxanci_ng@32 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e --- src/server.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/server.c') diff --git a/src/server.c b/src/server.c index e1dacf1..98fc96c 100644 --- a/src/server.c +++ b/src/server.c @@ -296,7 +296,7 @@ void sendInfoCreateClient(client_t *client) thisClient = (client_t *) listClient->list[i]; thisTux = thisClient->tux; - if( thisTux != client->tux ) + if( thisTux != NULL && thisTux != client->tux ) { proto_send_newtux_server(PROTO_SEND_ONE, thisClient, client->tux); proto_send_newtux_server(PROTO_SEND_ONE, client, thisTux); @@ -402,6 +402,10 @@ static void eventClientBuffer(client_t *client) if( strncmp(line, "ping", 4) == 0 )proto_recv_ping_server(client, line); if( strncmp(line, "end", 3) == 0 )proto_recv_end_server(client, line); } + +#if defined SUPPORT_NET_UNIX_UDP || defined SUPPORT_NET_SDL_UDP + client->lastPing = getMyTime(); +#endif } } -- cgit v1.2.3