Hello.

Investigating why empty bottles behve weirdly, here are some oddnesses:

* the insertion of the empty bottle in the bottle sometimes fails. Empty
tries to be inserted in creator's (bootle) map which is NULL for some
reason.

* merge_ob doesn't correctly free the item's inventory. Thus when you
pick a booze bottle and already have one, they get merged and empty
bottle is dropped on floor. Just a matter of using free_object2( , 1 )
to fix that, i guess. And I don't see any side effect, when merging
inventory should be destroyed!

* when applying a bottle, you'll get an empty bottle only if it's the
last bottle. This is because apply_food calls decrease_ob, which merely
decreases the item's count. Two fixes for that: apply_food checks for
inventory and if there is one splits items to copy inventory and drop
it. Or decrease_ob_nr splits itself, and always drops inventory when needed.
Last solution would be imo the best, but not sure of side effects of
that. That'd mean everytime you call it, the inventory of decreased
object gets dropped. Bad for scrolls & things like that, i think.

Anyone got opinions on that?

Nicolas

_______________________________________________
crossfire mailing list
crossfire@metalforge.org
http://mailman.metalforge.org/mailman/listinfo/crossfire

Reply via email to