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

Members: 0
Guests: 2
Stats
Files
Topics
Posts
Members
Newest Member
481
3,734
19,366
618
Micheal64X
Today's Birthdays
Vintar (28)
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,643
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 >>