On Mon, 18 Dec 1995, Kenneth G. Cavness wrote: > On Mon, 18 Dec 1995, Herbert Kremser wrote: > > > > > In utils.h we have the lines: > > > > #define IS_NPC(ch) MOB_FLAGS(ch).isnpc > > > > #define IS_MOB(ch) (IS_NPC(ch) && ((ch)->nr >-1)) > > > > > > Note the ((ch)->nr > -1) part of IS_MOB? > > > > > > That's the number that is automagically assigned to a character whenever > > > they are first created. That number will be -1 for a "real mob". If an > > > immortal is switched into an NPC, however, that number will be assigned > > > to whatever their number is. > > > > > > So, a MOB is an NPC that isn't switched into. > > > > When did that feature made it in the circle code? > > It's been there as long as I've been around (1993); as far as I know, it > is in Circle 2.2; perhaps Jeremy has made another type of function for > IS_MOB() in C3. Maybe you misunderstood me a bit. Of course even in stock diku IS_MOB was defined as #define IS_MOB(ch) (IS_SET((ch)->specials.act, ACT_ISNPC) && ((ch)->nr >-1)) but what i mean is, since when does switch change ch->nr ? In stock diku switched mobs still had their nr set to -1, and for circle 3.0 it seems the same. IS_MOB was just an additional check if the mob has an entry in mob_table too. Herbert __ [on public request 12 lines of signature deleted] *snip* ;)
This archive was generated by hypermail 2b30 : 12/07/00 PST