From a8bec57e7a9be7b1fa36ef8be618db4e46cbd599 Mon Sep 17 00:00:00 2001 From: oroborus Date: Tue, 15 Apr 2008 19:28:48 +0000 Subject: - oprava chyby #0007 #0006 #0005 - nova zbran bombball - client dostava svoju vlastnu poziciu od servera kazdych 5000 ms git-svn-id: http://opensvn.csie.org/tuxanci_ng@45 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e --- src/server.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/server.c') diff --git a/src/server.c b/src/server.c index f3972d3..90a388a 100644 --- a/src/server.c +++ b/src/server.c @@ -121,6 +121,18 @@ static void eventPeriodicSyncClient(void *p_nothink) } } +static void eventPeriodicSyncSelfClient(void *p_nothink) +{ + client_t *thisClient; + int i; + + for( i = 0 ; i < listClient->count; i++) + { + thisClient = (client_t *) listClient->list[i]; + proto_send_newtux_server(PROTO_SEND_ONE, thisClient, thisClient->tux); + } +} + static void eventSendPingClients(void *p_nothink) { proto_send_ping_server(PROTO_SEND_ALL, NULL); @@ -136,6 +148,7 @@ void static initServer() addTaskToTimer(listServerTimer, TIMER_PERIODIC, delZombieCLient, NULL, SERVER_TIMEOUT); addTaskToTimer(listServerTimer, TIMER_PERIODIC, eventPeriodicSyncClient, NULL, SERVER_TIME_SYNC); + addTaskToTimer(listServerTimer, TIMER_PERIODIC, eventPeriodicSyncSelfClient, NULL, 5000); addTaskToTimer(listServerTimer, TIMER_PERIODIC, eventSendPingClients, NULL, SERVER_TIME_PING); } -- cgit v1.2.3