From 8b93dd8dac51e28bb25ad341f594d21a955c3adb Mon Sep 17 00:00:00 2001 From: oroborus Date: Fri, 18 Jul 2008 19:19:10 +0000 Subject: - bezpecnejsie prepiannie screenov ( uz sa to nedeje v event() daneho screenu aj ked to on vyvolal ) - do laveho horneho rohu s nevypisuju blbiny - moduly pouzivaju funkcie actionSpace a actionSpaceFromLocation - dane funkcie sa pouzivaju aj pri vykreslovani objektov - btw. je jedno kolko zeru tuxanci top, na kerneli-2.6.25.* to zralo X a na kerneli 2.6.26 to zere 2*X git-svn-id: http://opensvn.csie.org/tuxanci_ng@159 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e --- src/base/server.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/base/server.c') diff --git a/src/base/server.c b/src/base/server.c index cf1f70f..ce4f848 100644 --- a/src/base/server.c +++ b/src/base/server.c @@ -364,6 +364,7 @@ static void addMsgAllClient(char *msg, int type, int id) static void addMsgAllClientSeesTux(char *msg, tux_t *tux, int type, int id) { + list_t *listHelp; arena_t *arena; space_t *space; int x, y, w, h; @@ -371,8 +372,6 @@ static void addMsgAllClientSeesTux(char *msg, tux_t *tux, int type, int id) assert( msg != NULL ); - listDoEmpty(listHelp); - arena = getCurrentArena(); space = arena->spaceTux; @@ -387,6 +386,8 @@ static void addMsgAllClientSeesTux(char *msg, tux_t *tux, int type, int id) if( w+x >= arena->w )w = arena->w - (x+1); if( h+y >= arena->h )h = arena->h - (y+1); + listHelp = newList(); + getObjectFromSpace(space, x, y, w, h, listHelp); //printf("%d %d %d %d %d\n", x, y, w, h, listHelp->count); @@ -409,6 +410,8 @@ static void addMsgAllClientSeesTux(char *msg, tux_t *tux, int type, int id) addMsgClient(thisClient, msg, type, id); } } + + destroyList(listHelp); } void protoSendClient(int type, client_t *client, char *msg, int type2, int id) -- cgit v1.2.3