Skip to content

Commit 6c8132b

Browse files
v3.2.0
1 parent 7f33fd0 commit 6c8132b

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Swing_Prediction.lua

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ menu.Style.Outline = true -- Outline around the menu
2020
client.SetConVar("sv_cheats", 1) -- debug fast setup
2121
client.SetConVar("mp_disable_respawn_times", 1)
2222
client.SetConVar("mp_respawnwavetime", -1)
23+
client.SetConVar("mp_teams_unbalance_limit", 1000)
2324
end, ItemFlags.FullWidth))]]
2425

2526
local Swingpred = menu:AddComponent(MenuLib.Checkbox("Enable", true))
26-
local debug = menu:AddComponent(MenuLib.Checkbox("visuals", false))
2727
local mAutoRefill = menu:AddComponent(MenuLib.Checkbox("Crit Refill", true))
28+
local debug = menu:AddComponent(MenuLib.Checkbox("visuals", false))
29+
local mAirduck = menu:AddComponent(MenuLib.Checkbox("Air duck", false))
2830
local mKillaura = menu:AddComponent(MenuLib.Checkbox("Killaura (soon)", false))
2931
local mtime = menu:AddComponent(MenuLib.Slider("attack distance", 150 ,300 , 250 ))
3032

@@ -261,7 +263,14 @@ if not isMelee then return end
261263
vPlayerFuture = TargetPositionPrediction(vPlayerOrigin, vPlayerOriginLast, tickRate, time, tick)
262264
pLocalFuture = TargetPositionPrediction(pLocalOrigin, pLocalOriginLast, tickRate, time, tick)
263265
end
264-
266+
local flags = pLocal:GetPropInt( "m_fFlags" );
267+
if mAirduck:GetValue() == true then
268+
if flags & FL_ONGROUND == 0 then
269+
pCmd:SetButtons(pCmd.buttons | IN_DUCK)
270+
else
271+
pCmd:SetButtons(pCmd.buttons & (~IN_DUCK))
272+
end
273+
end
265274
--[[-----------------------------Swing Prediction------------------------------------------------------------------------]]
266275

267276
-- bypass problem with prior attacking with shield not beeign able to reach target..

0 commit comments

Comments
 (0)