]> granicus.if.org Git - nethack/commitdiff
Only requiver pickup_thrown ammo and throwing weapons
authorPasi Kallinen <paxed@alt.org>
Wed, 6 Jan 2016 02:58:37 +0000 (04:58 +0200)
committerPasi Kallinen <paxed@alt.org>
Wed, 6 Jan 2016 02:58:37 +0000 (04:58 +0200)
include/extern.h
src/dothrow.c
src/invent.c

index 1c9c9af6dfcd073965fe66bdabdb1f95a326575f..5585692e0a4d99c7bf2023ccd70eb7689c8bf3c0 100644 (file)
@@ -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 *));
index 8de02854d4802e5dc256985259a8bf450e0e0a6a..fa02a11868875b00a6976b310d9e67f3235925d8 100644 (file)
@@ -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;
 {
index 1e220bbc45a5ada7c0e028e66fb7d2408230f4e1..0dd93861c3325f5ba779242e905e31b26f0bb7c5 100644 (file)
@@ -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);