object deletion during save operations
Not sure why my earlier attempt was unsuccessful. This one isn't as comprehensive but is simpler and better yet, works as intended. When saving a level or exiting the program, objects can be deleted directly rather than having to pass though the objs_deleted list.
This commit is contained in:
@@ -853,7 +853,9 @@ saveobjchn(NHFILE *nhfp, struct obj **obj_p)
|
||||
setworn((struct obj *) 0,
|
||||
otmp->owornmask & (W_BALL | W_CHAIN));
|
||||
otmp->owornmask = 0L; /* no longer care */
|
||||
program_state.freeingdata++;
|
||||
dealloc_obj(otmp);
|
||||
program_state.freeingdata--;
|
||||
}
|
||||
otmp = otmp2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user