redundant comparison code
: #define is_weptool(o) \ : ((o)->oclass == TOOL_CLASS && objects[(o)->otyp].oc_skill != P_NONE)
This commit is contained in:
+1
-2
@@ -326,8 +326,7 @@ wield_ok(struct obj *obj)
|
|||||||
if (obj->oclass == COIN_CLASS)
|
if (obj->oclass == COIN_CLASS)
|
||||||
return GETOBJ_EXCLUDE;
|
return GETOBJ_EXCLUDE;
|
||||||
|
|
||||||
if (obj->oclass == WEAPON_CLASS
|
if (obj->oclass == WEAPON_CLASS || is_weptool(obj))
|
||||||
|| (obj->oclass == TOOL_CLASS && is_weptool(obj)))
|
|
||||||
return GETOBJ_SUGGEST;
|
return GETOBJ_SUGGEST;
|
||||||
|
|
||||||
return GETOBJ_DOWNPLAY;
|
return GETOBJ_DOWNPLAY;
|
||||||
|
|||||||
Reference in New Issue
Block a user