From 5b67651831ad9b160b41990288c938c7a05c1db1 Mon Sep 17 00:00:00 2001 From: oroborus Date: Wed, 13 Aug 2008 13:54:09 +0000 Subject: - upravene indexovanie v index.c a space.c ktore indexovanie pouziva git-svn-id: http://opensvn.csie.org/tuxanci_ng@194 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e --- src/base/proto.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/base/proto.c') diff --git a/src/base/proto.c b/src/base/proto.c index 47acd81..8386a52 100644 --- a/src/base/proto.c +++ b/src/base/proto.c @@ -90,12 +90,16 @@ void proto_send_hello_client(char *name) #endif +static void action_sendItem(space_t *space, item_t *item, client_t *client) +{ + proto_send_additem_server(PROTO_SEND_ONE, client, item); +} + static void sendInfoCreateClient(client_t *client) { list_t *listClient; client_t *thisClient; tux_t *thisTux; - item_t *thisItem; int i; assert( client != NULL ); @@ -120,11 +124,14 @@ static void sendInfoCreateClient(client_t *client) } } - for( i = 0 ; i < getCurrentArena()->spaceItem->list->count; i++) + actionSpace(getCurrentArena()->spaceItem, action_sendItem, client); +/* + for( i = 0 ; i < getCurrentArena()->spaceItem->listIndex->count; i++) { thisItem = (item_t *) getCurrentArena()->spaceItem->list->list[i]; proto_send_additem_server(PROTO_SEND_ONE, client, thisItem); } +*/ } void proto_recv_hello_server(client_t *client, char *msg) @@ -203,7 +210,7 @@ void proto_send_status_server(int type, client_t *client) #endif version = TUXANCI_VERSION; - clients = getCurrentArena()->spaceTux->list->count; + clients = getCurrentArena()->spaceTux->listIndex->count; maxclients = getServerMaxClients(); uptime = (unsigned int)getUpdateServer(); arena = getArenaNetName( getChoiceArenaId() ); -- cgit v1.2.3