grenade_fix.handle = function(arg)
local player = entity.get_local_player()
local selected = player:get_player_weapon()
if not ui_handler.elements["features"]["grenade_fix"] then
return
end
if player == nil or not player:is_alive() then
return
end
if selected == nil then
return
end
local throw = selected.m_fThrowTime
if (throw ~= nil and throw ~= 0) then
return nil
else
if arg.in_attack then
local weapon = selected:get_classname()
if not string.match(weapon, "Grenade") then
return nil
end
end
end
end