Skip to content

Commit 24966ec

Browse files
v3.3.4
further fixes
1 parent e68b5c8 commit 24966ec

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Swing_Prediction.lua

+7-4
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ function GetClosestEnemy(pLocal, pLocalOrigin, players)
8282
end
8383
end
8484
end
85+
if closestDistance < 2000 then
8586
return closestPlayer
87+
else
88+
return nil
89+
end
8690
end
8791

8892
local lastVectors = {}
@@ -262,9 +266,8 @@ local function OnCreateMove(pCmd)
262266
pLocalOrigin = GetViewHeight()
263267
end
264268

265-
closestPlayer, closestDistance = GetClosestEnemy(pLocal, pLocalOrigin, players)
269+
closestPlayer = GetClosestEnemy(pLocal, pLocalOrigin, players)
266270
if closestPlayer == nil then goto continue end
267-
if closestDistance == 1200 then goto continue end
268271
vPlayerOrigin = closestPlayer:GetAbsOrigin()
269272
vdistance = (vPlayerOrigin - pLocalOrigin):Length()
270273
local Killaura = mKillaura:GetValue()
@@ -339,8 +342,8 @@ local function doDraw()
339342
if vPlayerOrigin == nil then return end
340343
if vPlayerFuture == nil and pLocalFuture == nil then return end
341344

342-
local pLocal = entities.GetLocalPlayer()
343-
if debug and debug:GetValue() == true and isMelee then
345+
--local pLocal = entities.GetLocalPlayer()
346+
if debug and debug:GetValue() == true then
344347
if pLocalFuture == nil then return end
345348
draw.SetFont( myfont )
346349
draw.Color( 255, 255, 255, 255 )

0 commit comments

Comments
 (0)