• R/O
  • SSH
  • HTTPS

jband: Commit


Commit MetaInfo

Revision132 (tree)
Time2009-06-29 15:56:38
Authorpaulblay

Log Message

Now caught up with Vanilla Angband Changeset 1455

Change Summary

Incremental Difference

--- trunk/JBand/src/cmd-obj.cpp (revision 131)
+++ trunk/JBand/src/cmd-obj.cpp (revision 132)
@@ -836,6 +836,7 @@
836836 {
837837 int item;
838838 object_type *o_ptr;
839+ bool cmd_needs_aim = FALSE;
839840
840841 const _TCHAR *q;
841842 const _TCHAR *s;
@@ -854,9 +855,20 @@
854855 /* Get the item */
855856 o_ptr = object_from_item_idx(item);
856857
858+ /* These commands need an aim */
859+ if (item_actions[act].command == CMD_QUAFF ||
860+ item_actions[act].command == CMD_ACTIVATE ||
861+ item_actions[act].command == CMD_USE_WAND ||
862+ item_actions[act].command == CMD_USE_ROD ||
863+ item_actions[act].command == CMD_USE_STAFF ||
864+ item_actions[act].command == CMD_READ_SCROLL)
865+ {
866+ cmd_needs_aim = TRUE;
867+ }
868+
857869 if (item_actions[act].action != NULL)
858870 item_actions[act].action(o_ptr, item);
859- else if (obj_needs_aim(o_ptr))
871+ else if (cmd_needs_aim && obj_needs_aim(o_ptr))
860872 {
861873 int dir;
862874 if (!get_aim_dir(&dir))
Show on old repository browser