@@ -161,20 +161,20 @@ local function ScanForEntities(Entity)
161
161
local Velocity = TargetInfo .Velocity
162
162
local Distance = TargetInfo .Distance
163
163
164
- local Damage = Entity .Damage
165
- local Spread = ACF .MaxDamageInaccuracy * Damage
164
+ local EntDamage = Entity .Damage
165
+ local Spread = ACF .MaxDamageInaccuracy * EntDamage
166
166
167
167
for Ent in pairs (Detected ) do
168
168
local EntPos = Ent .Position or Ent :GetPos ()
169
169
170
- if CheckLOS (Origin , EntPos ) and (math .Rand (0 ,1 ) >= (Damage / 10 )) then
171
- local Spread = VectorRand (- Spread , Spread )
170
+ if CheckLOS (Origin , EntPos ) and (math .Rand (0 ,1 ) >= (EntDamage / 10 )) then
171
+ local EntSpread = VectorRand (- Spread , Spread )
172
172
local EntVel = Ent .Velocity or Ent :GetVelocity ()
173
173
local Owner = GetEntityOwner (Entity .Owner , Ent )
174
174
local Index = GetEntityIndex (Ent )
175
175
176
- EntPos = EntPos + Spread
177
- EntVel = EntVel + Spread
176
+ EntPos = EntPos + EntSpread
177
+ EntVel = EntVel + EntSpread
178
178
Count = Count + 1
179
179
180
180
local EntDist = Origin :Distance (EntPos )
@@ -185,7 +185,7 @@ local function ScanForEntities(Entity)
185
185
Position = EntPos ,
186
186
Velocity = EntVel ,
187
187
Distance = EntDist ,
188
- Spread = Spread ,
188
+ Spread = EntSpread ,
189
189
}
190
190
191
191
IDs [Count ] = Index
0 commit comments