Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop NPCs throwing guns, fix throwing logic
When CleverRaven#49907 was cleaning up NPC attack logic, it introduced a check into many of the npc_attack_*::use functions to ensure that the NPC was wielding the weapon of choice, and if they were not wielding it, ensure that they did so they could perform that attack next. However, for the throwing attack, it checked if the wielded item was being wielded, causing this section to never be entered, and so the NPC would throw whatever their wielded item was, or, if they were not wielding an item, fail to perform an attack. In addition to this, add a check to ensure we can wield the appropriate item to npc_attack_throw::can_use. Also, make sure all NPC actions have a name to ease debugging.
- Loading branch information