Re: [CODE][RACES]Where...

From: *Erekosė* (yyrkoon_@geocities.com)
Date: 12/16/98


OK here is the WHOLE act() function.... I took the First Variable called and
added it into the Log Printout...

void act(const char *str, int hide_invisible, struct char_data *ch,
  struct obj_data *obj, const void *vict_obj, int type)
{
  struct char_data *to = NULL;
  int to_sleeping;

  if (!str || !*str)
    return;

   if ((to_sleeping = (type & TO_SLEEP)))
    type &= ~TO_SLEEP;

  if (type == TO_CHAR) {
    if (ch && SENDOK(ch))
      perform_act(str, ch, obj, vict_obj, ch);
    return;
  }

  if (type == TO_VICT) {
    if ((to = (struct char_data *) vict_obj) && SENDOK(to))
      perform_act(str, ch, obj, vict_obj, to);
    return;
  }

  if (ch && ch->in_room != NOWHERE)
    to = world[ch->in_room].people;
  else if (obj && obj->in_room != NOWHERE)
    to = world[obj->in_room].people;
  else {
    log("SYSERR: no valid target to act(%s)!", *str);       <-------Right
there...
    return;
  }

  for (; to; to = to->next_in_room) {
    if (!SENDOK(to) || (to == ch))
      continue;
    if (hide_invisible && ch && !CAN_SEE(to, ch))
      continue;
    if (type != TO_ROOM && to == vict_obj)
      continue;
    perform_act(str, ch, obj, vict_obj, to);
  }
}

How come before I added in the races I didn't get this problem but now I do?

*Erekosė*


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST