I've got it defined in merc.h:
#define EX_HIDDEN (m)

And then in tables.c it has an entry:
{ "hidden", EX_HIDDEN, TRUE };

(It's also in olc_save.c in save_rooms)

And I go into OLC, set the exit flags to hidden.  It
shows up on rstat that it has the hidden flag, but the
exit doesn't appear to be hidden, and I can walk
through it.

--- Chad Simmons <[EMAIL PROTECTED]> wrote:
> 
> --- Matt Foltz <[EMAIL PROTECTED]> wrote:
> > Maybe I'm just brain dead right now, but I can't
> > figure out the problem with this code.  It's
> pretty
> > self explanatory, you flag the exit with EX_HIDDEN
> and
> > if you don't have detect hidden on you can't see
> it or
> > go that way.  Here's what I did:
> > 
> > added:
> > bool can_see_exit( CHAR_DATA *ch, EXIT_DATA *pExit
> )
> > {
> >    if (IS_SET(pExit->exit_info, EX_HIDDEN )
> >      && !IS_AFFECTED(ch, AFF_DETECT_HIDDEN ) )
> >         return FALSE;
> >  
> >    return TRUE;
> > }
> > 
> > then in move_char:
> > if ( !can_see_exit( ch, pexit ) )
> > {
> >    send_to_char("Alas, you cannot go that
> way.\n\r",
> > ch);
> >    return;
> > }
> > 
> > It's pretty simple.  Except that I can walk
> through
> > hidden exits without detect hidden.  And if I
> change
> > the line to can_see_exit instead of !can_see_exit
> > (hoping I had a backwards true/false statement
> > somehow), if I CAN see the exit, I CAN'T walk
> through
> > it.  So it does go through the check, it's just
> not
> > checking right.  Any ideas?
> 
> The check is correct, the data therefore must not be
> what you are
> expecting.. How/were are you setting the exit_info
> to be EX_HIDDEN,
> and are you certain that you have the
> AFF_DETECT_HIDDEN flag switched
> on in the right place??
> 
> ~Kender
> 
> =====
> -----BEGIN GEEK CODE BLOCK-----
> Version 3.1
> GCS/L/C/O d-(+) s++: a-- C+++$>++++ UBLS++++$ 
> P+++(--)$ L+++>++++ E--- W+>++$ N !o K? w(--) !O 
> M- !V PS+ PE(++) Y+ PGP->+ t+ 5 X+() R(+) tv+@ 
> b++(+++) !DI+++ D G(-) e>+++$ h---() r+++ y+++
> ------END GEEK CODE BLOCK------
> 
> __________________________________________________
> Do you Yahoo!?
> Y! Web Hosting - Let the expert host your web site
> http://webhosting.yahoo.com/


__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/

Reply via email to