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?
-Matt Foltz

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

Reply via email to