Originally posted by [b]theultramage[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=1772
Hm.
CODE
for (i = 0; i < map_num; i++)
if (map[i].m >= 0)
map_foreachinmap(cleanup_sub, i, BL_ALL);
then
CODE
//Scan any remaining players (between maps?) to kick them out. [Skotlex]
iter = mapit_getallusers();
for( sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); sd = (TBL_PC*)mapit_next(iter) )
map_quit(sd);
mapit_free(iter);
finally
CODE
id_db->foreach(id_db,cleanup_db_sub);
static int cleanup_db_sub(DBKey key,void *data,va_list va)
{
return cleanup_sub((struct block_list*)data, NULL);
}
What's the point of all this juggling when everything is in the id_db and the last line can free everything?