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 ➜ Corpse making

Corpse making

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


Pages: 1  2  3 

Posted by Metsuro   USA  (389 posts)  Bio
Date Reply #30 on Thu 13 Jul 2006 03:45 PM (UTC)
Message
the only change to extract_char is that it is now new_extract_char, with the bool for it. then the one if check if its death or not. everything else calls extract_char which then calls new_extrac with false for death, however in fight.c

   set_char_color( AT_DIEMSG, victim );
   if( victim->pcdata->mdeaths + victim->pcdata->pdeaths < 3 )
      do_help( victim, "new_death" );
   else
      do_help( victim, "_DIEMSG_" );

   new_extract_char( victim, FALSE, TRUE );
   if( !victim )
   {
      bug( "%s: oops! extract_char destroyed pc char", __FUNCTION__ );
      return;
   }


which is the only call that should tell extract that death is true.

Everything turns around in the end
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #31 on Thu 13 Jul 2006 03:58 PM (UTC)
Message
Well, it's still very hard to say if it would work because we can only partially see the code, so . . . when you run the code, does it do what you expect?

If you want to see if you have leaks, you can run a tool like valgrind, if you have it available on your system.

By the way, did you put in that if (!victim) check in fight.c?

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Metsuro   USA  (389 posts)  Bio
Date Reply #32 on Thu 13 Jul 2006 04:02 PM (UTC)
Message
No i didn't, it was already there. The only thing I dont really know if its working correctly or not is this loaded objs business. In memory i have

IdxObjs: 88 Objs: 39(21)

Me being the only one on this confuses me some what. so theres 21 objects in the world but 39 ob those objs are worn or in another object? or is it 21 in the world that arn't worn or in something, and 39 that are worn and in something?

Everything turns around in the end
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #33 on Thu 13 Jul 2006 04:06 PM (UTC)
Message
It might be 39 logical objs, but 21 object structure instances. Recall that objects can be grouped together ("stacked").

One thing you can try is just create corpses several times and see if that number goes up incorrectly or varies in some unexpected way. If it does, then you have a problem.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by Metsuro   USA  (389 posts)  Bio
Date Reply #34 on Thu 13 Jul 2006 04:14 PM (UTC)
Message
Objs: 48(29)
this is what happened after one of my players logged on an killed one of the mobs about 5 times. first number went up 5 from the blood she created, then 4 for the items she wearing? but if so that only accounts for the 48 and not the 29?

Everything turns around in the end
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.


100,989 views.

This is page 3, subject is 3 pages long:  [Previous page]  1  2  3 

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.