look_in_direction & auto_exits

From: David Cole (tiznor@hotmail.com)
Date: 01/08/02


Hello,

Thanks for many posts on the bitvector situation, I finnaly came to terms
with the 128 bit patch and spend a few days cursing, spitting, and about 2
cases of dr pepper before I got it working correctly, but I did! :)

Anyways, I'm rewriting look_in_direction, and however this has been posted
before, but the question I'm asking has not... I've managed to do everything
correctly below: but I cannot seem to get auto_exits to show the exits in
the other room, I've tryed a various amount fo different things but most
fall into errors about incompadable types and what when I try replacing ch
with anything other than ch. Anyways.. heres the bit:

void look_in_direction(struct char_data * ch, int dir)
{
  int next_room;

  if (IS_DARK(ch->in_room) && !CAN_SEE_IN_DARK(ch)) {
    send_to_char("&zIt is pitch black...&n\r\n", ch);
    return;
  } else if (AFF_FLAGGED(ch, AFF_BLIND)) {
    send_to_char("&WYou can't see a damn thing, your blind!&n\r\n", ch);
    return;
  }
    if (EXIT(ch, dir) && EXIT(ch, dir)->to_room != NOWHERE &&
  !IS_SET(EXIT(ch, dir)->exit_info, EX_SECRET)) {
    if (IS_SET(EXIT(ch, dir)->exit_info, EX_CLOSED) && EXIT(ch,
dir)->keyword) {
          sprintf(buf, "The %s is closed.\r\n", fname(EXIT(ch,
dir)->keyword));
          send_to_char(buf, ch);
    if (EXIT(ch, dir)->general_description)
          send_to_char(EXIT(ch, dir)->general_description, ch);
 } else {
      next_room = world[ch->in_room].dir_option[dir]->to_room;

      send_to_char(world[next_room].name, ch);
      send_to_char(CCNRM(ch, C_NRM), ch);
      send_to_char("\r\n", ch);
      send_to_char(world[next_room].description, ch);
      do_auto_exits(ch);
// Here is the bad boy above, its showing the exits for the room the char
// looks from, not the room he/she is looking too, I know thats because it
// currently saying ch->in_room or something to that effect. I figured you
// could replace ch with something? that will make it work correctly? My
// memory fails me atm, so can anyone enlighten me?
      list_obj_to_char(world[next_room].contents, ch, 0, FALSE);
      list_char_to_char(world[next_room].people, ch);
 }
  } else
   send_to_char("You see nothing special..\r\n", ch);
}

Thanks,
Dave (Tiznor)

It's probably staring me right in the face, in bold, bright, blinking
letters. But for some off reason I still don't see it...

--
   +---------------------------------------------------------------+
   | 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