Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, Majestic-12, Google, Bing

Members: 0
Guests: 6
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » invis glowing support doesn't...
Forum Rules | Mark all | Recent Posts

invis glowing support doesn't work right
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Sep 1, 2006, 6:51 am   Last edited Sep 1, 2006, 11:06 am by Valcados
Go to the top of the page
Go to the bottom of the page

Valcados
Apprentice
GroupMembers
Posts63
JoinedAug 25, 2006

In act_info.c, in format_obj_to_char, find this:
   if( fShort )
   {
      if( glowsee && !IS_IMMORTAL( ch ) )
         mudstrlcat( buf, "the faint glow of something", MAX_STRING_LENGTH );
      else if( obj->short_descr )
         mudstrlcat( buf, obj->short_descr, MAX_STRING_LENGTH );
   }
   else
   {
      if( glowsee )
         mudstrlcat( buf, "You see the faint glow of something nearby.", MAX_STRING_LENGTH );
      if( obj->description )
         mudstrlcat( buf, obj->description, MAX_STRING_LENGTH );
   }
   return buf;


Change it to this:
   if( fShort )
   {
      if( glowsee && ( IS_NPC(ch) || !xIS_SET( ch->act, PLR_HOLYLIGHT ) ) )
      {
         *buf = '\0';
         mudstrlcat( buf, "the faint glow of something", MAX_STRING_LENGTH );
      }
      else if( obj->short_descr )
         mudstrlcat( buf, obj->short_descr, MAX_STRING_LENGTH );
   }
   else
   {
      if( glowsee && ( IS_NPC(ch) || !xIS_SET( ch->act, PLR_HOLYLIGHT ) ) )
      {
         *buf = '\0';
         mudstrlcat( buf, "You see the faint glow of something nearby.", MAX_STRING_LENGTH );
      }
      else if( obj->description )
         mudstrlcat( buf, obj->description, MAX_STRING_LENGTH );
   }
   return buf;


In act_info.c, in show_list_to_char, find
        if ( obj->wear_loc == WEAR_NONE
        && can_see_obj( ch, obj )
        && (obj->item_type != ITEM_TRAP || IS_AFFECTED(ch, AFF_DETECTTRAPS) ) )


Change it to
        if ( obj->wear_loc == WEAR_NONE
        && ( can_see_obj( ch, obj ) || ( IS_OBJ_STAT( obj, ITEM_INVIS ) && IS_OBJ_STAT( obj, ITEM_GLOW ) ) )
        && ( ( !IS_OBJ_STAT( obj, ITEM_BURIED ) && !IS_OBJ_STAT( obj, ITEM_HIDDEN ) )
        ||    ( !IS_NPC(ch) && xIS_SET(ch->act, PLR_HOLYLIGHT) ) )
        && (obj->item_type != ITEM_TRAP || IS_AFFECTED(ch, AFF_DETECTTRAPS) ) )
       
Post is unread #2 Sep 1, 2006, 10:36 am   Last edited Sep 1, 2006, 10:37 am by Remcon
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,868
JoinedJul 26, 2005

Nice catch, I don't think this is how it should actually do it though, reason being that since its useing mudstrlcat which means its just going to put that onto whats already in buf, so you could end up with more then it should show.
Like since its got at least INVIS and GLOW on it you are likly to see something like this
(Invis)(Glowing)the faint glow of something
It should instead maybe use mudstrlcpy or something when dealing with the glowsee parts, what you think?
       
Post is unread #3 Sep 1, 2006, 11:06 am
Go to the top of the page
Go to the bottom of the page

Valcados
Apprentice
GroupMembers
Posts63
JoinedAug 25, 2006

Ooh, good point Remcon *flying high five*

I also realized without some other code exclusive to my own version, the above fix would allow the glowing objects to glow despite being buried and hidden :rolleyes: So I have edited my OP to fix both issues :biggrin:
       
Pages:<< prev 1 next >>