The Dawn Of Time
The Official Forums for the Dawn Of Time Mud Codebase
 
Log in Register FAQ Memberlist Search The Dawn Of Time Forum Index Goto the Official Dawn Website

Lost object in memory in do_flip()

 
Post new topic   Reply to topic    The Dawn Of Time Forum Index » 1.69r possible bug reports
View previous topic :: View next topic  
Author Message
Trell



Joined: 28 Jun 2013
Posts: 49

PostPosted: Tue Jan 26, 2016 9:06 pm    Post subject: Lost object in memory in do_flip() Reply with quote

In skill_ke.cpp there is a do_flip() command for flipping a coin to get heads or tails. I noticed when adding in code for a project, that it creates the coin object, and then has this:
Code:

if ( !IS_OOC(ch) ){
      obj_to_room( coin, ch->in_room );
}


But if a player IS_OOC nothing happens to the coin, it just stays in memory and is forgotten. There are two options to fix this, first, you can do this for both silver and gold coins:

Code:

if ( !IS_OOC(ch) ){
   obj_to_room( coin, ch->in_room );
}else{
        extract_obj(coin);
}


The second option is to just get rid of the surrounding !IS_OOC check, which will allow ooc coin flips, but will put the coin in the room instead of leaving it in memory.


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    The Dawn Of Time Forum Index » 1.69r possible bug reports All times are GMT + 13 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001-2005 phpBB Group
Theme created by Vjacheslav Trushkin