From: Pasi Kallinen Date: Wed, 6 Jan 2016 02:58:37 +0000 (+0200) Subject: Only requiver pickup_thrown ammo and throwing weapons X-Git-Tag: NetHack-3.6.1_RC01~1064^2~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4aeb2913cf58848ee4e3dadee59fffb737358f5f;p=nethack Only requiver pickup_thrown ammo and throwing weapons --- diff --git a/include/extern.h b/include/extern.h index 1c9c9af6d..5585692e0 100644 --- a/include/extern.h +++ b/include/extern.h @@ -498,6 +498,7 @@ E void FDECL(endmultishot, (BOOLEAN_P)); E void FDECL(hitfloor, (struct obj *)); E void FDECL(hurtle, (int, int, int, BOOLEAN_P)); E void FDECL(mhurtle, (struct monst *, int, int, int)); +E boolean FDECL(throwing_weapon, (struct obj *)); E void FDECL(throwit, (struct obj *, long, BOOLEAN_P)); E int FDECL(omon_adj, (struct monst *, struct obj *, BOOLEAN_P)); E int FDECL(thitmonst, (struct monst *, struct obj *)); diff --git a/src/dothrow.c b/src/dothrow.c index 8de02854d..fa02a1186 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -16,7 +16,6 @@ STATIC_DCL void FDECL(check_shop_obj, (struct obj *, XCHAR_P, XCHAR_P, BOOLEAN_P)); STATIC_DCL void FDECL(breakmsg, (struct obj *, BOOLEAN_P)); STATIC_DCL boolean FDECL(toss_up, (struct obj *, BOOLEAN_P)); -STATIC_DCL boolean FDECL(throwing_weapon, (struct obj *)); STATIC_DCL void FDECL(sho_obj_return_to_u, (struct obj * obj)); STATIC_DCL boolean FDECL(mhurtle_step, (genericptr_t, int, int)); @@ -943,7 +942,7 @@ boolean hitsroof; } /* return true for weapon meant to be thrown; excludes ammo */ -STATIC_OVL boolean +boolean throwing_weapon(obj) struct obj *obj; { diff --git a/src/invent.c b/src/invent.c index 1e220bbc4..0dd93861c 100644 --- a/src/invent.c +++ b/src/invent.c @@ -479,7 +479,8 @@ struct obj *obj; obj->where = OBJ_INVENT; /* fill empty quiver if obj was thrown */ - if (flags.pickup_thrown && !uquiver && obj_was_thrown) + if (flags.pickup_thrown && !uquiver && obj_was_thrown + && (throwing_weapon(obj) || is_ammo(obj))) setuqwep(obj); added: addinv_core2(obj);