Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
Bug in do_drag( )
Oct 8, 2017, 12:40 am
By GatewaySysop
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Beastmaster 6D sound files
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, DotBot

Members: 0
Guests: 12
Stats
Files
Topics
Posts
Members
Newest Member
476
3,704
19,231
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SWR FUSS » room_is_dark function
Forum Rules | Mark all | Recent Posts

room_is_dark function
< Newer Topic :: Older Topic > handler.c

Pages:<< prev 1 next >>
Post is unread #1 Aug 23, 2006, 5:01 pm   Last edited Aug 23, 2006, 5:45 pm by Banner
Go to the top of the page
Go to the bottom of the page

Banner
Magician
GroupMembers
Posts169
JoinedNov 29, 2005

An immortal pointed out to be that while he has HOLYLIGHT on, which makes you see "what's in the game more easily", you still see room names as "Too Dark to Tell", unless you are standing in that room and you look at the room's name on look. I thought that was weird, so I looked at room_is_dark in handler.c, and low and behold, it only accepts one argument for the pRoomIndex.

/*
 * True if room is dark.
 */
bool room_is_dark( ROOM_INDEX_DATA *pRoomIndex )
{


Would it hurt anything if we changed that to accept two arguments for ch as well?

/*
 * True if room is dark.
 */
bool room_is_dark( CHAR_DATA *ch, ROOM_INDEX_DATA *pRoomIndex )
{


That way, we can add this check in the room_is_dark function?

   if( IS_SET( ch->act, PLR_HOLYLIGHT ))
      return FALSE;  


It'd also involve searching your code for room_is_dark and changing them to accept two arguments, and that's not hard at all. Any input is appreciated. Thank you.

--
The title of this thread is supposed to say room_is_dark, sorry.
       
Post is unread #2 Aug 24, 2006, 2:51 am
Go to the top of the page
Go to the bottom of the page

kiasyn
Magician
GroupMembers
Posts121
JoinedJun 30, 2006

well really when you call it you can just do
if ( !IS_SET(ch->act,PLR_HOLYLIGHT) && !room_is_dark(ch->in_room) )
{
send_to_char(" too dark!", ch );
return;
}
       
Post is unread #3 Aug 24, 2006, 8:42 am
Go to the top of the page
Go to the bottom of the page

Banner
Magician
GroupMembers
Posts169
JoinedNov 29, 2005

Well, you could, but it'd be easier to modify the main function instead of working around it like that.
       
Pages:<< prev 1 next >>