Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ Hotboot, duplicate corpse items

Hotboot, duplicate corpse items

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Zeno   USA  (2,871 posts)  Bio
Date Sat 02 Oct 2004 05:52 AM (UTC)
Message
Seems that everytime I hotboot, it duplicates items in a corpse?

Quote:
Tarnoth chats 'umm i kinda need a imms help all the changes tripled the stuff on my corpse ;( and now i have two exta dragon arms that i cant drop'


Its true, had to check it myself. No idea what to look for. Anyone know?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #1 on Sat 02 Oct 2004 03:25 PM (UTC)
Message
Are you using Samson's hotboot? If so, you may have missed the step that stops writing corpses, and then you get multiple ones.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #2 on Sat 02 Oct 2004 04:15 PM (UTC)

Amended on Sat 02 Oct 2004 04:20 PM (UTC) by Zeno

Message
Yeah I am. Don't think I missed any steps. One second.

[EDIT] Checked the snippet intructions, I didn't miss anything to do with corpses in save.c, and I don't think I missed anything at all. As I said, corpses are fine, but items in the corpse are not.


    if ( obj->prev_content && os_type != OS_CORPSE )
        if( os_type == OS_CARRY )
           fwrite_obj( ch, obj->prev_content, fp, iNest, OS_CARRY, hotboot );

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Samson   USA  (683 posts)  Bio
Date Reply #3 on Sat 02 Oct 2004 05:52 PM (UTC)
Message
YOu should have had a step which told you to do this:

Quote:

Then locate this segment:

/* Corpse saving. -- Altrag */
fprintf( fp, (os_type == OS_CORPSE ? "#CORPSE\n" : "#OBJECT\n") );

Directly ABOVE that, add this:

/* DO NOT save corpses lying on the ground as a hotboot item, they already saved elsewhere! - Samson */
if( hotboot && obj->item_type == ITEM_CORPSE_PC )
return;


That is what stops a hotboot from saving a corpse since corpses are already saved in another section.
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #4 on Sat 02 Oct 2004 06:25 PM (UTC)
Message
Yeah. Already in.

    /*    Munch magic flagged containers for now - bandaid */
    if ( obj->item_type == ITEM_CONTAINER
    &&   IS_OBJ_STAT( obj, ITEM_MAGIC ) )
        xTOGGLE_BIT( obj->extra_flags, ITEM_MAGIC );

    /* DO NOT save corpses lying on the ground as a hotboot item, they already saved elsewhere! $
    if( hotboot && obj->item_type == ITEM_CORPSE_PC )
        return;

    /* Corpse saving. -- Altrag */
    fprintf( fp, (os_type == OS_CORPSE ? "#CORPSE\n" : "#OBJECT\n") );

    if ( iNest )

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #5 on Sun 03 Oct 2004 05:09 AM (UTC)
Message
Can you confirm that this didn't happen before you put hotboot? It may be a problem with the corpse code, unlikely, but possible.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #6 on Sun 03 Oct 2004 05:33 AM (UTC)
Message
Hmmmm. Yes, I believe it was fine pre-hotboot. I didn't put in hotboot until a while after I started the MUD.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Greven   Canada  (835 posts)  Bio
Date Reply #7 on Sun 03 Oct 2004 05:59 AM (UTC)
Message
Hmmm, well from the little code thats here it looks like everything should be good. You might want to try booting in gdb, putting a break on something that will specifically target the items in the corpse so you can get the memory adress of the corpse. You can then remove that break, and put a conditional break in fwrite_obj, checking that the object equals the memory adress you got before. You could also set up a conditional check to check the name of the items. That may give you some more info, you would be able to find out where its being written from, and narrow your search down a little.

Nobody ever expects the spanish inquisition!

darkwarriors.net:4848
http://darkwarriors.net
Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #8 on Sat 05 Mar 2005 03:38 PM (UTC)

Amended on Sat 05 Mar 2005 03:49 PM (UTC) by Zeno

Message
Hmm it's still happening of course. There was one shard in the corpse:
[ 2681] Derius: Sat Mar  5 07:23:50 2005 :: Derius(0) got a purified shard from in corpse Derius(11) in room 2681.
(hotboot)
[ 2681] Derius: Sat Mar  5 08:11:11 2005 :: Derius(0) got a purified shard from in corpse Derius(11) in room 2681.


I compared write_corpses to current SmaugFUSS, no difference. Calls to fwrite_obj also have no difference.
[EDIT] Just checked the function fwrite_obj, no difference.
(besides what object fields I have added)

Also I cannot reproduce this every time.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

Posted by Asean Novari   USA  (82 posts)  Bio
Date Reply #9 on Sat 05 Mar 2005 06:40 PM (UTC)
Message
I had this problem a bit ago.. it fixed itself and went on to a different section.. for me its now happening to lockers.



Top

Posted by Zeno   USA  (2,871 posts)  Bio
Date Reply #10 on Sat 05 Mar 2005 09:50 PM (UTC)
Message
How did you fix it?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


25,517 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.