Only requiver pickup_thrown ammo and throwing weapons

This commit is contained in:
Pasi Kallinen
2016-01-06 04:58:37 +02:00
parent 6b559d06f0
commit 4aeb2913cf
3 changed files with 4 additions and 3 deletions

View 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 *));

View 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;
{

View 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);