@@ -82,7 +82,11 @@ function GetClosestEnemy(pLocal, pLocalOrigin, players)
82
82
end
83
83
end
84
84
end
85
+ if closestDistance < 2000 then
85
86
return closestPlayer
87
+ else
88
+ return nil
89
+ end
86
90
end
87
91
88
92
local lastVectors = {}
@@ -262,9 +266,8 @@ local function OnCreateMove(pCmd)
262
266
pLocalOrigin = GetViewHeight ()
263
267
end
264
268
265
- closestPlayer , closestDistance = GetClosestEnemy (pLocal , pLocalOrigin , players )
269
+ closestPlayer = GetClosestEnemy (pLocal , pLocalOrigin , players )
266
270
if closestPlayer == nil then goto continue end
267
- if closestDistance == 1200 then goto continue end
268
271
vPlayerOrigin = closestPlayer :GetAbsOrigin ()
269
272
vdistance = (vPlayerOrigin - pLocalOrigin ):Length ()
270
273
local Killaura = mKillaura :GetValue ()
@@ -339,8 +342,8 @@ local function doDraw()
339
342
if vPlayerOrigin == nil then return end
340
343
if vPlayerFuture == nil and pLocalFuture == nil then return end
341
344
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
344
347
if pLocalFuture == nil then return end
345
348
draw .SetFont ( myfont )
346
349
draw .Color ( 255 , 255 , 255 , 255 )
0 commit comments