static NEARDATA const char bullets[] =
{ ALLOW_COUNT, COIN_CLASS, ALL_CLASSES, GEM_CLASS, 0 };
+struct obj *thrownobj = 0; /* tracks an object until it lands */
+
extern boolean notonhead; /* for long worms */
u.dz = 1;
}
+ thrownobj = obj;
+
if(u.uswallow) {
mon = u.ustuck;
bhitpos.x = mon->mx;
} else {
hitfloor(obj);
}
+ thrownobj = (struct obj*)0;
return;
} else if(obj->otyp == BOOMERANG && !Underwater) {
setworn(obj, wep_mask);
u.twoweap = twoweap;
}
+ thrownobj = (struct obj*)0;
return;
}
} else {
boolean obj_gone;
if (mon->isshk &&
- obj->where == OBJ_MINVENT && obj->ocarry == mon)
+ obj->where == OBJ_MINVENT && obj->ocarry == mon) {
+ thrownobj = (struct obj*)0;
return; /* alert shk caught it */
+ }
(void) snuff_candle(obj);
notonhead = (bhitpos.x != mon->mx || bhitpos.y != mon->my);
obj_gone = thitmonst(mon, obj);
losehp(dmg, xname(obj),
obj_is_pname(obj) ? KILLED_BY : KILLED_BY_AN);
}
- if (ship_object(obj, u.ux, u.uy, FALSE))
+ if (ship_object(obj, u.ux, u.uy, FALSE)) {
+ thrownobj = (struct obj*)0;
return;
+ }
dropy(obj);
}
+ thrownobj = (struct obj*)0;
return;
}
if(*u.ushops)
check_shop_obj(obj, bhitpos.x, bhitpos.y, FALSE);
(void) mpickobj(mon, obj); /* may merge and free obj */
+ thrownobj = (struct obj*)0;
return;
}
(void) snuff_candle(obj);
- if (!mon && ship_object(obj, bhitpos.x, bhitpos.y, FALSE))
+ if (!mon && ship_object(obj, bhitpos.x, bhitpos.y, FALSE)) {
+ thrownobj = (struct obj*)0;
return;
+ }
+ thrownobj = (struct obj*)0;
place_object(obj, bhitpos.x, bhitpos.y);
if(*u.ushops && obj != uball)
check_shop_obj(obj, bhitpos.x, bhitpos.y, FALSE);
#define IS_SHOP(x) (rooms[x].rtype >= SHOPBASE)
extern const struct shclass shtypes[]; /* defined in shknam.c */
+extern struct obj *thrownobj; /* defined in dothrow.c */
STATIC_VAR NEARDATA long int followmsg; /* last time of follow message */
clear_unpaid(invent);
clear_unpaid(fobj);
clear_unpaid(level.buriedobjlist);
+ if (thrownobj) thrownobj->unpaid = 0;
for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
clear_unpaid(mtmp->minvent);
for(mtmp = migrating_mons; mtmp; mtmp = mtmp->nmon)