Skip to content

Commit 2f42c02

Browse files
v3.1.0
added solution choise
1 parent be98560 commit 2f42c02

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

Swing_Prediction.lua

+22-7
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ local mAutoRefill = menu:AddComponent(MenuLib.Checkbox("Auto Crit Refill", tru
2727
local mKillaura = menu:AddComponent(MenuLib.Checkbox("Killaura (soon)", false))
2828
local mtime = menu:AddComponent(MenuLib.Slider("movement ahead", 100 ,300 , 250 ))
2929
local msamples = menu:AddComponent(MenuLib.Slider("Velocity Samples", 1 ,777 , 132 ))
30+
local solution = {
31+
"default",
32+
"strafe pred"
33+
}
34+
35+
local msolution = menu:AddComponent(MenuLib.Combo("Prediction Solution", solution))
36+
--solution:GetSelectedIndex() -- Selected item index (number)
37+
3038
--amples = menu:AddComponent(MenuLib.Slider("movement ahead", 1 ,25 , 200 ))
3139

3240
local pastPredictions = {}
@@ -239,14 +247,21 @@ if not isMelee then return end
239247
local Killaura = mKillaura:GetValue()
240248

241249
--[[position prediction]]--
242-
if tick % 8 == 0 or tick == nil then
243-
tick = 0
244-
end
245-
tick = tick + 1
246-
247-
vPlayerFuture = (vPlayerOrigin + closestPlayer:EstimateAbsVelocity() * time)--TargetPositionPrediction(vPlayerOrigin, vPlayerOriginLast, tickRate, time, tick)
248-
pLocalFuture = (pLocalOrigin + pLocal:EstimateAbsVelocity() * time) --TargetPositionPrediction(pLocalOrigin, pLocalOriginLast, tickRate, time, tick)
250+
249251

252+
if msolution:IsSelected("default") then
253+
vPlayerFuture = (vPlayerOrigin + closestPlayer:EstimateAbsVelocity() * time)--TargetPositionPrediction(vPlayerOrigin, vPlayerOriginLast, tickRate, time, tick)
254+
pLocalFuture = (pLocalOrigin + pLocal:EstimateAbsVelocity() * time) --TargetPositionPrediction(pLocalOrigin, pLocalOriginLast, tickRate, time, tick)
255+
else
256+
print("working")
257+
if tick % 8 == 0 or tick == nil then
258+
tick = 0
259+
end
260+
tick = tick + 1
261+
vPlayerFuture = TargetPositionPrediction(vPlayerOrigin, vPlayerOriginLast, tickRate, time, tick)
262+
pLocalFuture = TargetPositionPrediction(pLocalOrigin, pLocalOriginLast, tickRate, time, tick)
263+
end
264+
250265
--[[-----------------------------Swing Prediction------------------------------------------------------------------------]]
251266

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

0 commit comments

Comments
 (0)