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