oextra follow-up - merging (trunk only)

It seemed inappropriate to allocate and tack on an oextra
structure just to mark it as unmergable, and the oextra
struct itself wouldn't be released until a save/restore took
place.

This uses one of the freed up oattached bits to prevent the merge.
This commit is contained in:
nethack.allison
2006-04-15 13:37:58 +00:00
parent e7948e258c
commit d156b95e0d
3 changed files with 9 additions and 3 deletions

View File

@@ -94,9 +94,12 @@ struct obj {
Bitfield(lamplit,1); /* a light-source -- can be lit */
#ifdef INVISIBLE_OBJECTS
Bitfield(oinvis,1); /* invisible */
#else
Bitfield(oreserved1,1);
#endif
Bitfield(greased,1); /* covered with grease */
/* 2 free bits */
Bitfield(nomerge,1); /* set temporarily to prevent merging */
/* 1 free bit */
Bitfield(in_use,1); /* for magic items before useup items */
Bitfield(bypass,1); /* mark this as an object to be skipped by bhito() */