Login
User Name:

Password:



Register
Forgot your password?
LOP 1.39r1
Author: Remcon
Submitted by: Remcon
Yaeger areas
Author: Yaeger
Submitted by: Cyberthrope
The City of Anon
Author: Yaeger
Submitted by: Cyberthrope
The Walls of Anon - Smaug
Author: Yaeger
Submitted by: Cyberthrope
LOP 1.39
Author: Remcon
Submitted by: Remcon
CommonCrawl, Yahoo!, Google

Members: 0
Guests: 1
Stats
Files
Topics
Posts
Members
Newest Member
375
3,323
16,514
561
Aurin
Affiliates
Smaug Building Institute Arthmoor
» SmaugMuds.org » Codebases » SWR FUSS » Bug in fold_area
Forum Rules | Mark all | Recent Posts

Bug in fold_area
< Newer Topic :: Older Topic > Or major annoyance really

Pages:<< prev 1 next >>
Post is unread #1 Jul 1, 2009, 10:20 pm
Go to the bottom of the page Go to the top of the page


Banner
Magician
GroupMembers
Posts164
JoinedNov 29, 2005
WWW AIM Yahoo MSN Skype


   fprintf( fpout, "#ROOMS\n" );
   for( vnum = tarea->low_r_vnum; vnum <= tarea->hi_r_vnum; vnum++ )
   {
      if( ( room = get_room_index( vnum ) ) == NULL )
         continue;
      if( install )
      {
         CHAR_DATA *victim, *vnext;
         OBJ_DATA *obj, *obj_next;

         /*
          * remove prototype flag from room
          */
         REMOVE_BIT( room->room_flags, ROOM_PROTOTYPE );
         /*
          * purge room of (prototyped) mobiles
          */
         for( victim = room->first_person; victim; victim = vnext )
         {
            vnext = victim->next_in_room;
            if( IS_NPC( victim ) )
               extract_char( victim, TRUE );
         }
         /*
          * purge room of (prototyped) objects
          */
  /*       for( obj = room->first_content; obj; obj = obj_next )
         {
            obj_next = obj->next_content;
            extract_obj( obj );
         }
  */
      }


Hullo! The problem above is the obj for loop. The theory seems to be that they wanted to purge prototype objects that got stuck in the area by a builder that forgot to remove a flag, except, unless I'm missing something, there is no check for the prototype flag on the object. The mob check is the same, however, none of my mobs were randomly disappearing.

I discovered this problem when a player would design a ship (which would save pships.are), and subsequently every player ship in the game would be purged of any item not in the list of resets, which is essentially every item a player has dropped in his or her ship. Several people have workshops on their ships where they stash items while they make armor and whatnot, and several suits of armor and items came up missing this way. I dug around and found out it only happened after someone had made a ship, and none of the ship building routines purged the items, so it must have been the area fold. I looked and ta-da, therein lied the problem, and commenting it out no longer purged rooms.

So, question, why are mobs not getting eaten by this if neither for loop checks for a prototype flag, and will commenting this out do any major harm aside from not purging items on an area fold? My builders are more than capable of removing prototype flags anyway and resetting objects correctly so this is of no concern to me. .........................
Lead Developer,
Star Wars: Galactic Insights
http://www.swgi.org


sudo apt-get sandwich
       
Post is unread #2 Jul 1, 2009, 10:28 pm   Last edited Jul 1, 2009, 10:52 pm by Kayle
Go to the bottom of the page Go to the top of the page


Kayle
Nibelungen
GroupAdministrators
Posts1,041
JoinedMar 21, 2006
WWW

Uh.. Why not just add a prototype check?

         for( obj = room->first_content; obj; obj = obj_next )
         {
            obj_next = obj->next_content;
            extract_obj( obj );
         }


Becomes
         for( obj = room->first_content; obj; obj = obj_next )
         {
            obj_next = obj->next_content;
            if( IS_SET( obj->extra_flags, ITEM_PROTOTYPE )
               extract_obj( obj );
         }


Disclaimer: Untested, and I can't even remember if that's the right field. So uh.. double check that if you use it. .........................
Owner/Coder -- Malevolent Whispers -- Development Phase - Not accepting players
Coder -- Star Wars: The Sith Wars -- Open Alpha - Players Welcome - Full System Re-writes Imminent.

I3 Contact: Kayle@SithWars
       
Post is unread #3 Jul 1, 2009, 10:39 pm
Go to the bottom of the page Go to the top of the page


Banner
Magician
GroupMembers
Posts164
JoinedNov 29, 2005
WWW AIM Yahoo MSN Skype

Banner said:

My builders are more than capable of removing prototype flags anyway and resetting objects correctly so this is of no concern to me.

And I know how to fix it, did you even read the last part of my post? :P .........................
Lead Developer,
Star Wars: Galactic Insights
http://www.swgi.org


sudo apt-get sandwich
       
Post is unread #4 Jul 1, 2009, 10:53 pm
Go to the bottom of the page Go to the top of the page


Kayle
Nibelungen
GroupAdministrators
Posts1,041
JoinedMar 21, 2006
WWW

Yeah, but the reason I asked was because it would have been just as easy to add the prototype check instead of just commenting it out. :P .........................
Owner/Coder -- Malevolent Whispers -- Development Phase - Not accepting players
Coder -- Star Wars: The Sith Wars -- Open Alpha - Players Welcome - Full System Re-writes Imminent.

I3 Contact: Kayle@SithWars
       
Post is unread #5 Jul 2, 2009, 9:47 pm
Go to the bottom of the page Go to the top of the page


Kayle
Nibelungen
GroupAdministrators
Posts1,041
JoinedMar 21, 2006
WWW

Updated local copy with fix, will make it official once I sleep. .........................
Owner/Coder -- Malevolent Whispers -- Development Phase - Not accepting players
Coder -- Star Wars: The Sith Wars -- Open Alpha - Players Welcome - Full System Re-writes Imminent.

I3 Contact: Kayle@SithWars
       
Post is unread #6 Jul 2, 2009, 10:03 pm
Go to the bottom of the page Go to the top of the page


Banner
Magician
GroupMembers
Posts164
JoinedNov 29, 2005
WWW AIM Yahoo MSN Skype


Kayle said:

Updated local copy with fix, will make it official once I sleep.

That was.. fast. Usually this process takes months. 8ducks* .........................
Lead Developer,
Star Wars: Galactic Insights
http://www.swgi.org


sudo apt-get sandwich
       
Post is unread #7 Jul 2, 2009, 10:10 pm
Go to the bottom of the page Go to the top of the page


Kayle
Nibelungen
GroupAdministrators
Posts1,041
JoinedMar 21, 2006
WWW

Smartass. Just for that, I'm gonna take care of updating the bases now. .........................
Owner/Coder -- Malevolent Whispers -- Development Phase - Not accepting players
Coder -- Star Wars: The Sith Wars -- Open Alpha - Players Welcome - Full System Re-writes Imminent.

I3 Contact: Kayle@SithWars
       
Post is unread #8 Jul 3, 2009, 6:29 pm
Go to the bottom of the page Go to the top of the page


Conner
Sorcerer
GroupMembers
Posts833
JoinedMay 8, 2005
WWW ICQ AIM Yahoo MSN GT

Kayle said:

Updated local copy with fix, will make it official once I sleep.

Would it be safe to assume that the official solution will ave te added prototype check rather than a removal of a for loop? .........................
-=Conner=-

Administrator/Coder Primary SysOp
Land of Legends The Castle's Dungeon BBS

telnet://tcdbbs.zapto.org:4000 telnet://tcdbbs.zapto.org:23
       
Post is unread #9 Jul 3, 2009, 7:33 pm
Go to the bottom of the page Go to the top of the page


Kayle
Nibelungen
GroupAdministrators
Posts1,041
JoinedMar 21, 2006
WWW

Bugfixes were posted. And the packages were released. But yes, the prototype check was used in the official fix. .........................
Owner/Coder -- Malevolent Whispers -- Development Phase - Not accepting players
Coder -- Star Wars: The Sith Wars -- Open Alpha - Players Welcome - Full System Re-writes Imminent.

I3 Contact: Kayle@SithWars
       
Post is unread #10 Jul 4, 2009, 11:23 pm
Go to the bottom of the page Go to the top of the page


Conner
Sorcerer
GroupMembers
Posts833
JoinedMay 8, 2005
WWW ICQ AIM Yahoo MSN GT

Saw the posted bugfixes after I posted the question, but glad to see it. While Banner's builders may very well be inhumanly perfect, I suspect that the rest of the mudding community is filled with builders (and coders) who are either new enough to make that sort of mistake all too easily or who occasionally forget (or miss one) and, with his solution, would run a very real risk of crashing the mud because of it. .........................
-=Conner=-

Administrator/Coder Primary SysOp
Land of Legends The Castle's Dungeon BBS

telnet://tcdbbs.zapto.org:4000 telnet://tcdbbs.zapto.org:23
       
Pages:<< prev 1 next >>

 
Contact Us