Lua struct obj improvements
If the core frees the obj struct referred by lua, don't free it, just mark it as OBJ_LUAFREE - lua will free it in gc once all the references to it are gone.
This commit is contained in:
@@ -66,7 +66,8 @@ struct obj {
|
||||
#define OBJ_MIGRATING 5 /* object sent off to another level */
|
||||
#define OBJ_BURIED 6 /* object buried */
|
||||
#define OBJ_ONBILL 7 /* object on shk bill */
|
||||
#define NOBJ_STATES 8
|
||||
#define OBJ_LUAFREE 8 /* object has been dealloc'd, but is ref'd by lua */
|
||||
#define NOBJ_STATES 9
|
||||
xchar timed; /* # of fuses (timers) attached to this obj */
|
||||
|
||||
Bitfield(cursed, 1);
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* Incrementing EDITLEVEL can be used to force invalidation of old bones
|
||||
* and save files.
|
||||
*/
|
||||
#define EDITLEVEL 7
|
||||
#define EDITLEVEL 8
|
||||
|
||||
#define COPYRIGHT_BANNER_A "NetHack, Copyright 1985-2019"
|
||||
#define COPYRIGHT_BANNER_B \
|
||||
|
||||
Reference in New Issue
Block a user