summaryrefslogtreecommitdiff
path: root/src/server.c
diff options
context:
space:
mode:
authororoborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-03-22 22:13:43 +0000
committeroroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-03-22 22:13:43 +0000
commit20ecf36f401adad01cc5ff67e411c596a8b523d5 (patch)
tree846175c5b9027d576ab67daa2e28c50ddfc693d6 /src/server.c
parent114131bf71d7d4ec48c92a7bde8183442995940f (diff)
- 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
Diffstat (limited to 'src/server.c')
-rw-r--r--src/server.c6
1 files changed, 5 insertions, 1 deletions
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
}
}