[no gbp] fixes monkey disarming leading to runtimes (#88128)

This commit is contained in:
Ben10Omintrix
2024-11-23 23:45:55 +01:00
committed by GitHub
parent ef2ca85e8e
commit c3fa8a91b5
+2 -2
View File
@@ -140,10 +140,10 @@
return AI_BEHAVIOR_DELAY | AI_BEHAVIOR_SUCCEEDED
// check if target has a weapon
var/holding_weapon = FALSE
var/holding_weapon
for(var/obj/item/potential_weapon in target.held_items)
if(!(potential_weapon.item_flags & ABSTRACT))
holding_weapon = TRUE
holding_weapon = potential_weapon
break
var/attack_results = monkey_attack(controller, target, seconds_per_tick, holding_weapon && SPT_PROB(MONKEY_ATTACK_DISARM_PROB, seconds_per_tick), holding_weapon)