Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
 parse description bug
Yesterday, 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
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
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
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, DotBot, Yahoo!

Members: 0
Guests: 7
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,240
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » Mposet can cause supermob's n...
Forum Rules | Mark all | Recent Posts

Mposet can cause supermob's name/shortdesc to go out of synch
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Aug 31, 2006, 11:29 am
Go to the top of the page
Go to the bottom of the page

Valcados
Apprentice
GroupMembers
Posts63
JoinedAug 25, 2006

Hello everyone,

My name is Valcados, I am very happy to find a place where SMAUG is still actively discussed. I will contribute bug reports as time permits. I've been coding SMAUG for over 5 years now, and would really like to pay back something to the community, especially if I could ever get around to publishing some of the uncountably many snippets I've written.
Here's a bug. As you're so well aware, when an object prog runs, the supermob assumes the object's shortdesc, so as to give the illusion that the object itself is performing the actions. But if, during this process, the object's shortdesc changes, supermob does not change accordingly.

In mud.h, find
extern CHAR_DATA *supermob;


Change it to
extern CHAR_DATA *supermob;
extern OBJ_DATA *supermob_obj;


In db.c, find
int physicalobjects;

Change it to
int physicalobjects;
OBJ_DATA *supermob_obj;


In mud_prog.c, find:
void release_supermob(  )
{
   char_from_room( supermob );
   char_to_room( supermob, get_room_index( 3 ) );
}


Change it to:
void release_supermob(  )
{
   supermob_obj = NULL;
   char_from_room( supermob );
   char_to_room( supermob, get_room_index( 3 ) );
}


In mud_prog.c, in the function set_supermob, right below
   if( !obj )
      return;

add
supermob_obj = obj;


In mpxset.c, in do_mposet, find
   if( !str_cmp( arg2, "short" ) )
   {
      STRFREE( obj->short_descr );
      obj->short_descr = STRALLOC( arg3 );
 


Change it to
   if( !str_cmp( arg2, "short" ) )
   {
      STRFREE( obj->short_descr );
      obj->short_descr = STRALLOC( arg3 );
      if ( obj == supermob_obj )
      {
         if ( supermob->short_descr)
           STRFREE( supermob->short_descr );
         supermob->short_descr = QUICKLINK( obj->short_descr );
      }


That should do it. You could make a similar change to do_oset in act_wiz.c, though it's quite unlikely do_oset will change the object right in the middle of the oprog, unless the object is literally mpforcing imms to oset it.
       
Post is unread #2 Aug 31, 2006, 11:51 am
Go to the top of the page
Go to the bottom of the page

Conner
Sorcerer
GroupMembers
Posts870
JoinedMay 8, 2005

Welcome aboard Valcados.

Nice catch. Though should probably have been posted to the SmaugFUSS section rather than General Discussions.

Shouldn't need it in do_oset since, as you've pointed out, that's only a concern if the object is mpforcing the immortal to oset it and mpforce shouldn't work on an immortal.
       
Pages:<< prev 1 next >>