Hmmm, that shouldn't be happening. Are you sure its that code. With the
obj->item_type == ITEM_CORPSE_PC check, only corpses should save. You should
check to see what data is being saved, by stopping it from unlinking the
objcopy.txt file.
Davion
From: [EMAIL PROTECTED]
To: [email protected]
Subject: Object Saving
Date: Thu, 11 Sep 2003 05:06:51 +0000
I'm trying to add object saving over copyovers to my mud and having a bit
of
trouble. If the corpse is in a room that has resets in it (ie.. donation
pits), the corpse saves but when it reloads I get multiple pits/fountains
etc...
I'm using Davion's corpse saving snippet. The section of code that checks
for resets is below. Can someone tell me if this looks accurate. I can
post
more of the code if need be.
Thanks for your help.
-Mike
fpObj = fopen("../area/objcopy.txt", "w" );
for ( obj = object_list; obj != NULL; obj = obj->next )
{ has_reset = FALSE;
if(obj->carried_by )
continue;
if(obj->item_type != ITEM_CORPSE_PC )
continue;
for ( pReset = obj->in_room->reset_first; pReset; pReset = pReset->next )
{ if(( (pReset->command == 'O' || pReset->command== 'P')
&& pReset->arg3 == obj->pIndexData->vnum ) ||
( pReset->command == 'E' && pReset->arg1 == obj->pIndexData->vnum ) )
{ has_reset = TRUE;
break;
}
}
if(has_reset)
continue;
fwrite_obj(NULL, obj, fpObj, 0 );
}
fprintf(fpObj, "#END\n");
fclose(fpObj);
> No one has any idea at all?
>
>
_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8.
http://join.msn.com/?page=features/junkmail