Skip to content

Commit

Permalink
Fix linter complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
thecraftianman committed Nov 30, 2023
1 parent 8e484c7 commit 7b7e1ea
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lua/entities/acf_radar/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -161,20 +161,20 @@ local function ScanForEntities(Entity)
local Velocity = TargetInfo.Velocity
local Distance = TargetInfo.Distance

local Damage = Entity.Damage
local Spread = ACF.MaxDamageInaccuracy * Damage
local EntDamage = Entity.Damage
local Spread = ACF.MaxDamageInaccuracy * EntDamage

for Ent in pairs(Detected) do
local EntPos = Ent.Position or Ent:GetPos()

if CheckLOS(Origin, EntPos) and (math.Rand(0,1) >= (Damage / 10)) then
local Spread = VectorRand(-Spread, Spread)
if CheckLOS(Origin, EntPos) and (math.Rand(0,1) >= (EntDamage / 10)) then
local EntSpread = VectorRand(-Spread, Spread)
local EntVel = Ent.Velocity or Ent:GetVelocity()
local Owner = GetEntityOwner(Entity.Owner, Ent)
local Index = GetEntityIndex(Ent)

EntPos = EntPos + Spread
EntVel = EntVel + Spread
EntPos = EntPos + EntSpread
EntVel = EntVel + EntSpread
Count = Count + 1

local EntDist = Origin:Distance(EntPos)
Expand All @@ -185,7 +185,7 @@ local function ScanForEntities(Entity)
Position = EntPos,
Velocity = EntVel,
Distance = EntDist,
Spread = Spread,
Spread = EntSpread,
}

IDs[Count] = Index
Expand Down

0 comments on commit 7b7e1ea

Please sign in to comment.