Changeset 1455 for trunk

Show
Ignore:
Timestamp:
06/28/09 09:36:16 (14 months ago)
Author:
ajps
Message:

Stop requesting an aim for wielding, etc, items with an activation. Closes bug #889.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/cmd-obj.c

    r1450 r1455  
    834834        int item; 
    835835        object_type *o_ptr; 
     836        bool cmd_needs_aim = FALSE; 
    836837 
    837838        cptr q, s; 
     
    852853        o_ptr = object_from_item_idx(item); 
    853854 
     855        /* These commands need an aim */ 
     856        if (item_actions[act].command == CMD_QUAFF || 
     857                item_actions[act].command == CMD_ACTIVATE || 
     858                item_actions[act].command == CMD_USE_WAND || 
     859                item_actions[act].command == CMD_USE_ROD || 
     860                item_actions[act].command == CMD_USE_STAFF || 
     861                item_actions[act].command == CMD_READ_SCROLL) 
     862        { 
     863                cmd_needs_aim = TRUE; 
     864        } 
     865 
    854866        if (item_actions[act].action != NULL) 
    855867                item_actions[act].action(o_ptr, item); 
    856         else if (obj_needs_aim(o_ptr)) 
     868        else if (cmd_needs_aim && obj_needs_aim(o_ptr)) 
    857869        { 
    858870                int dir;