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, Bing

Members: 0
Guests: 13
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
614
BenitoVirg
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » AFKMud Bugfix List » AFKMud Bug Archive » [Bug] delete_room saves areas...
Forum Rules | Mark all | Recent Posts

[Bug] delete_room saves areas when not desireable
< Newer Topic :: Older Topic > AFKMud 1.64

Pages:<< prev 1 next >>
Post is unread #1 Feb 13, 2005, 11:47 am   Last edited Nov 13, 2005, 11:55 am by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Bug: delete_room saves areas when not desireable
Discovered in: AFKMud 1.64
Danger: Low - Unintended result
Found by: Samson
Fixed by: Samson

---

db.c, delete_room

Locate:

   if( !mud_down )
   {
      for( ex = room->first_exit; ex; ex = ex->next )
      {
         pArea = ex->to_room->area;

         if( ( ( pexit = ex->rexit ) != NULL ) && pexit != ex )
         {
            extract_exit( ex->to_room, pexit );

            if( !IS_AREA_FLAG( pArea, AFLAG_PROTOTYPE ) )
               mudstrlcpy( filename, pArea->filename, 256 );
            else
               snprintf( filename, 256, "%s%s", BUILD_DIR, pArea->filename );
            fold_area( pArea, filename, FALSE );
         }
      }
   }


Change to:

   if( !mud_down )
   {
      for( ex = room->first_exit; ex; ex = ex->next )
      {
         pArea = ex->to_room->area;

         if( ( ( pexit = ex->rexit ) != NULL ) && pexit != ex )
         {
            extract_exit( ex->to_room, pexit );

            if( pArea != room->area )
            {
               if( !IS_AREA_FLAG( pArea, AFLAG_PROTOTYPE ) )
                  mudstrlcpy( filename, pArea->filename, 256 );
               else
                  snprintf( filename, 256, "%s%s", BUILD_DIR, pArea->filename );
               fold_area( pArea, filename, FALSE );
            }
         }
      }
   }


The delete_room function should not save an area being worked on if the room being deleted does not have exits to outside areas. The intnetion of the above block of code was to have the external area be updated and saved so it would not generate bad exit messages in the logs. Often times builders will forget to have outside areas updated.
       
Pages:<< prev 1 next >>