Re: look_in_direction & auto_exits

From: John (witpens@optushome.com.au)
Date: 01/08/02


----- Original Message -----
From: "David Cole" <tiznor@HOTMAIL.COM>
>      do_auto_exits(ch);

do_auto_exits only show the exits in the room ch is in ie ch->in_room,
NOT next_room. So, the most simple method - cut and paste do_auto_exits
and hack into it. Here is what I have done:-

int door, slen = 0;  // declare these at the top of your function
*buf = '\0';

#define W_EXIT(r, e) (world[r].dir_option[e])

  for (door = 0; door < NUM_OF_DIRS; door++)
    if (W_EXIT(next_room, door) && W_EXIT(next_room, door)->to_room !=
NOWHERE &&
 !EXIT_FLAGGED(W_EXIT(next_room, door), EX_CLOSED))
      slen += sprintf(buf + slen, "%c ", LOWER(*dirs[door]));

  sprintf(buf2, "%s[ Exits: %s]%s\r\n", CCCYN(ch, C_NRM),
   *buf ? buf : "None! ", CCNRM(ch, C_NRM));

  send_to_char(buf2, ch);

And there ya have it.
Get rid of your do_auto_exits(ch) call up.

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT