scan_room = rch->in_room;
scan_list(scan_room, rch, 0, -1, obj);
for (door = 0; door < 6; door++)
{
if ((pExit = scan_room->exit[door]) != NULL)
scan_list(pExit->u1.to_room, rch, 1, door, obj);
}
void scan_obj (CHAR_DATA *ch, sh_int depth, sh_int door)
{
extern char *const dir_name[];
extern char *const distance[];
char buf[MAX_INPUT_LENGTH], buf2[MAX_INPUT_LENGTH];
buf[0] = '\0';
sendch ("{*", ch);
sprintf (buf, "The radar has found a dragonball");
strcat (buf, " ");
if (depth == 0)
sprintf (buf2, distance[1]);
else
sprintf (buf2, distance[depth], dir_name[door]);
strcat (buf, buf2);
strcat (buf, "\n\r");
sendch (buf, ch);
return;
}
scan_room = rch->in_room;
scan_list (scan_room, rch, 0, -1, obj);
for (door = 0; door < 6; door++)
{
if ( (pExit = rch->in_room->exit[door]) != NULL)
{
for (depth = 1; depth < MAX_DEPTH; depth++)
{
if ((pExit1 = scan_room->exit[door]) != NULL)
{
scan_room = pExit1->u1.to_room;
scan_list (scan_room, rch, depth, door, obj);
}
}
}
}
scan_room = rch->in_room;
scan_list (scan_room, rch, 0, -1, obj);
for (door = 0; door < 6; door++)
{
if ( (pExit = rch->in_room->exit[door]) != NULL)
{
for (depth = 1; depth < MAX_DEPTH; depth++)
{
if ((pExit1 = scan_room->exit[door]) != NULL)
{
scan_room = pExit1->u1.to_room;
scan_list (scan_room, rch, depth, door, obj);
}
}
}
}
for (door = 0; door < 6; door++)
{
if ((pExit = ch->in_room->exit[door]) != NULL)
scan_list (pExit->u1.to_room, ch, 1, door, NULL);
}
scan_room = ch->in_room;
for (depth = 1; depth < 4; depth++)
{
if ((pExit = scan_room->exit[door]) != NULL)
{
scan_room = pExit->u1.to_room;
scan_list (pExit->u1.to_room, ch, depth, door, NULL);
}
}
The comment part is the problem. Anyone have any ideas?