Im kinda curious if anyone else picked up on this, I encountered this while creating a new object value (I call it value6) Specifically for the objects level. I noticed a fairly large bug in the fold_area function in build.c
The code as it exists now in 1.4a is the following:
in function void fold_area:
/* save objects */
fprintf( fpout, "#OBJECTS\n" );
for ( vnum = tarea->low_o_vnum; vnum <= tarea->hi_o_vnum; vnum++ )
{
if ( (pObjIndex = get_obj_index( vnum )) == NULL )
continue;
if ( install )
xREMOVE_BIT( pObjIndex->extra_flags, ITEM_PROTOTYPE );
fprintf( fpout, "#%d\n", vnum );
fprintf( fpout, "%s~\n", pObjIndex->name );
fprintf( fpout, "%s~\n", pObjIndex->short_descr );
fprintf( fpout, "%s~\n", pObjIndex->description );
fprintf( fpout, "%s~\n", pObjIndex->action_desc );
if ( pObjIndex->layers )
fprintf( fpout, "%d %s %d %d\n", pObjIndex->item_type,
print_bitvector(&pObjIndex->extra_flags),
pObjIndex->wear_flags,
pObjIndex->layers );
else
fprintf( fpout, "%d %s %d %d\n", pObjIndex->item_type,
print_bitvector(&pObjIndex->extra_flags),
pObjIndex->wear_flags,
pObjIndex->layers );
val0 = pObjIndex->value[0];
val1 = pObjIndex->value[1];
val2 = pObjIndex->value[2];
val3 = pObjIndex->value[3];
val4 = pObjIndex->value[4];
val5 = pObjIndex->value[5];
/* Added for Object Level support -Kelsid */
val6 = pObjIndex->value[6];
The only problem with this is in the values... see it saves the pObjectIndex->value, not the obj->value. When you oset something, you normally change the obj->value (Unless its a prototype object). Its possible that this is done on purpose and really shouldnt be doing things this way. Im posting this just in case any users out there are using non-prototype areas (Ones that are in the area.lst file) and are wondering why when they oset an object,then fold the area it dosnt save.
Hope this helps with some of the mystery.
-Kelsid |