object deletion bookkeeping
After the apply-wielded-pie-to-blind-self (quite a while back) and quivered-candle-burns-out (a week or two ago) bugs where object deletion left dangling worn-object pointers, add a general check to try to catch such things at the time of deletion. Also, clear thrownobj and kickobj pointers at the time corresponding object is deleted. (This doesn't add any checks for them becoming null during process of throwing or kicking, where I'm not sure that the possibility of missile going away is being adequately tracked).
This commit is contained in:
+2
-2
@@ -11,6 +11,8 @@
|
||||
static NEARDATA struct rm *maploc, nowhere;
|
||||
static NEARDATA const char *gate_str;
|
||||
|
||||
struct obj *kickobj; /* also used by obfree(shk.c) */
|
||||
|
||||
extern boolean notonhead; /* for long worms */
|
||||
|
||||
STATIC_DCL void FDECL(kickdmg, (struct monst *, BOOLEAN_P));
|
||||
@@ -20,8 +22,6 @@ STATIC_DCL char *FDECL(kickstr, (char *));
|
||||
STATIC_DCL void FDECL(otransit_msg, (struct obj *, BOOLEAN_P, long));
|
||||
STATIC_DCL void FDECL(drop_to, (coord *,SCHAR_P));
|
||||
|
||||
static NEARDATA struct obj *kickobj;
|
||||
|
||||
static const char kick_passes_thru[] = "kick passes harmlessly through";
|
||||
|
||||
STATIC_OVL void
|
||||
|
||||
Reference in New Issue
Block a user