Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit abdc5bf

Browse files
committed
Auto-equip fix to stop unwanted misfire
1 parent 55fd4ad commit abdc5bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Base.rte/AI/HumanFunctions.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ end
2727

2828
function HumanFunctions.DoAutomaticEquip(actor)
2929
-- Equip a weapon automatically if the one held by a player is destroyed
30-
if actor:IsPlayerControlled() and actor.EquippedItem == nil and actor.InventorySize > 0 then
30+
if actor:IsPlayerControlled() and actor.EquippedItem == nil and actor.InventorySize > 0 and not actor.controller:IsState(Controller.WEAPON_FIRE) then
3131
actor:EquipFirearm(true);
3232
end
3333
end

0 commit comments

Comments
 (0)