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));
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
extern const struct shclass shtypes[]; /* defined in shknam.c */
extern struct obj *thrownobj; /* defined in dothrow.c */
+extern struct obj *kickobj; /* dokick.c */
STATIC_VAR NEARDATA long int followmsg; /* last time of follow message */
STATIC_VAR const char and_its_contents[] = " and its contents";
clear_unpaid(fobj);
clear_unpaid(level.buriedobjlist);
if (thrownobj) thrownobj->unpaid = 0;
+ if (kickobj) kickobj->unpaid = 0;
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
clear_unpaid(mtmp->minvent);
for(mtmp = migrating_mons; mtmp; mtmp = mtmp->nmon)
#endif
}
}
+ if (obj->owornmask) {
+ impossible("obfree: deleting worn obj (%d: %ld)",
+ obj->otyp, obj->owornmask);
+ /* unfortunately at this point we don't know whether worn mask
+ applied to hero or a monster or perhaps something bogus, so
+ can't call remove_worn_item() to get <X>_off() side-effects */
+ setnotworn(obj);
+ }
+ if (obj == thrownobj) thrownobj = 0;
+ if (obj == kickobj) kickobj = 0;
dealloc_obj(obj);
}