diff options
Diffstat (limited to 'src/base/server.c')
| -rw-r--r-- | src/base/server.c | 7 |
1 files changed, 5 insertions, 2 deletions
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) |