Re: [CODE] question

From: George (greerga@CIRCLEMUD.ORG)
Date: 06/09/98

On Tue, 9 Jun 1998, Andrey Fidrya wrote:

>I have a question concerning MOB_ISNPC flag. It looks very hackish (we have to
>reserve 1 bit in PLR* for it). Is there any reason to not use something like:
>#define IS_NPC(ch) (ch->nr != -1)  or
>#define IS_NPC(ch) (GET_PFILEPOS(ch) != -1)?

I can't think of a reason not to offhand although there was a bug
previously (< bpl12) that all players had a 'ch->nr' of 0.

>Also, is there any difference between IS_NPC and IS_MOB?
>(I saw #defines, but why would we use IS_MOB in some places of code instead
>of IS_NPC?)

IS_NPC mobiles don't necessarily have a prototype, IS_MOB mobiles must have
a prototype.

George Greer, | Genius may have its limitations, but          | stupidity is not thus handicapped.    |                  -- Elbert Hubbard

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

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