/* Get the item index */
if (repeat_pull(cp))
{
- if (*cp == INVEN_FORCE) { /* the_force */
- item_tester_tval = 0;
- item_tester_hook = NULL;
- return (TRUE);
- } else
+ /* the_force */
+ if (*cp == INVEN_FORCE)
+ {
+ item_tester_tval = 0;
+ item_tester_hook = NULL;
+ command_cmd = 0; /* Hack -- command_cmd is no longer effective */
+ return (TRUE);
+ }
+
/* Floor item? */
- if (*cp < 0)
+ else if (*cp < 0)
{
object_type *o_ptr;
/* Forget the item_tester_hook restriction */
item_tester_hook = NULL;
+ command_cmd = 0; /* Hack -- command_cmd is no longer effective */
+
/* Success */
return (TRUE);
}
/* Forget the item_tester_hook restriction */
item_tester_hook = NULL;
+ command_cmd = 0; /* Hack -- command_cmd is no longer effective */
+
/* Success */
return (TRUE);
}
/* Warning if needed */
if (oops && str) msg_print(str);
+ if (item)
+ {
#ifdef ALLOW_REPEAT
- if (item) repeat_push(*cp);
+ repeat_push(*cp);
#endif /* ALLOW_REPEAT */
+ command_cmd = 0; /* Hack -- command_cmd is no longer effective */
+ }
+
/* Result */
return (item);
}
/* Get the item index */
if (repeat_pull(cp))
{
- if (*cp == INVEN_FORCE) { /* the_force */
- item_tester_tval = 0;
- item_tester_hook = NULL;
- return (TRUE);
- } else
+ /* the_force */
+ if (*cp == INVEN_FORCE)
+ {
+ item_tester_tval = 0;
+ item_tester_hook = NULL;
+ command_cmd = 0; /* Hack -- command_cmd is no longer effective */
+ return (TRUE);
+ }
+
/* Floor item? */
- if (*cp < 0)
+ else if (*cp < 0)
{
object_type *o_ptr;
/* Forget the item_tester_hook restriction */
item_tester_hook = NULL;
+ command_cmd = 0; /* Hack -- command_cmd is no longer effective */
+
/* Success */
return (TRUE);
}
/* Forget the item_tester_hook restriction */
item_tester_hook = NULL;
+ command_cmd = 0; /* Hack -- command_cmd is no longer effective */
+
/* Success */
return (TRUE);
}
/* Warning if needed */
if (oops && str) msg_print(str);
+ if (item)
+ {
#ifdef ALLOW_REPEAT
- if (item) repeat_push(*cp);
+ repeat_push(*cp);
#endif /* ALLOW_REPEAT */
+ command_cmd = 0; /* Hack -- command_cmd is no longer effective */
+ }
+
/* Result */
return (item);
}