PERS macro bug?

From: John Evans (evansj@DATAWEST.NET)
Date: 06/14/98


I just noticed that with HolyLight on, that invis mobs are still coming up
as "Someone" on act, even though I can see them in the room and look at
them. This "Someone" is created, by the PERS() macro in utils.h. Here is
what I have (same as stock bpl11):

#define PERS(ch, vict)   (CAN_SEE(vict, ch) ? GET_NAME(ch) : "Someone")

All other occurances of CAN_SEE list the ch, before the vict. Perhaps they
need to be reversed in the macro to make things work properly?

I took the above thought and changed the PERS() macro to be:

#define PERS(ch, vict)   (CAN_SEE(ch, vict) ? GET_NAME(ch) : "Someone")
                                  ^^^^^^^^
                               See the change?

This also required the following change in comm.c in perform_act():

      case 'N':
-        CHECK_NULL(vict_obj, PERS((struct char_data *) vict_obj), to);
+        CHECK_NULL(vict_obj, PERS(to, (struct char_data *) vict_obj));
        break;

This cleared up the problem with PERS() returning "Someone" when it should
not.

George/Jeremy,
        You may want to check bpl13 and see if this problem is still
around.

John Evans <evansj@datawest.net>
http://www.hi-line.net/~evansj/              telnet://spear.gator.net:1066

Any sufficiently advanced technology is indistinguishable from magic.
--Arthur C. Clarke


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



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