Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, Yandex, Google

Members: 0
Guests: 21
Stats
Files
Topics
Posts
Members
Newest Member
481
3,739
19,386
621
KellieBusb
Today's Birthdays
Rane (42)
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,874
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 >>