Skip to content

Commit

Permalink
Fix: throwing items from outside the inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
Brambor committed May 21, 2024
1 parent 39e2afa commit c477161
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/npc_attack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ npc_attack_rating npc_attack_throw::evaluate(
// please don't throw your pants...
return effectiveness;
}
const inventory &available_weapons = source.crafting_inventory( -1 );
const inventory &available_weapons = source.crafting_inventory( tripoint_zero, -1 );
if( &thrown_item == source.evaluate_best_weapon() &&
available_weapons.amount_of( thrown_item.typeId() ) <= 1 &&
available_weapons.charges_of( thrown_item.typeId() ) <= 1 ) {
Expand Down

0 comments on commit c477161

Please sign in to comment.