Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ext/Server/Bot/BotAttacking.lua
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,9 @@ local function _DefaultAttackingAction(p_Bot)
p_Bot._ActiveAction ~= BotActionFlags.GrenadeActive) or Config.BotWeapon == BotWeapons.Grenade then
-- Should be triggered only once per fireMode.
if MathUtils:GetRandomInt(1, 100) <= Registry.BOT.PROBABILITY_THROW_GRENADE then
if p_Bot.m_Grenade ~= nil and p_Bot._DistanceToPlayer < 25.0 then -- Algorith only works for up to 25 m.
if p_Bot.m_Grenade ~= nil
and p_Bot._DistanceToPlayer > 15.0
and p_Bot._DistanceToPlayer < 25.0 then -- Algorithm only works for up to 25 m.
p_Bot._ActiveAction = BotActionFlags.GrenadeActive
end
end
Expand Down