Skip to content

Commit c505ccb

Browse files
Make more stuff work with visclips
1 parent c97753d commit c505ccb

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

lua/acf/entities/fuzes/optical.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ if CLIENT then
3131
else
3232
local TraceData = { start = true, endpos = true, filter = true }
3333
local Entities = Classes.Entities
34+
local Trace = ACF.trace
3435

3536
Entities.AddArguments("acf_ammo", "FuzeDistance") -- Adding extra info to ammo crates
3637

@@ -64,7 +65,7 @@ else
6465
TraceData.endpos = Position + Missile:GetForward() * self.Distance
6566
TraceData.filter = Missile.Filter or { Missile }
6667

67-
return util.TraceLine(TraceData).Hit
68+
return Trace(TraceData).Hit
6869
end
6970

7071
function Fuze:OnLast(Entity)

lua/acf/entities/guidance/laser.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if CLIENT then
1717
Guidance.Description = "This guidance package reads a target-position from the launcher and guides the munition towards it."
1818
else
1919
local TraceData = { start = true, endpos = true, mask = MASK_SOLID_BRUSHONLY }
20-
local TraceLine = util.TraceLine
20+
local Trace = ACF.trace
2121
local Lasers = ACF.ActiveLasers
2222

2323
function Guidance.GetDirectionDot(Missile, TargetPos)
@@ -34,7 +34,7 @@ else
3434
TraceData.start = Position
3535
TraceData.endpos = TargetPos
3636

37-
return not TraceLine(TraceData).Hit
37+
return not Trace(TraceData).Hit
3838
end
3939

4040
function Guidance:CheckComputer(Missile)

lua/acf/entities/guidance/radio_mclos.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if CLIENT then
99
Guidance.Description = "This guidance package allows you to manually control the direction of the missile."
1010
else
1111
local TraceData = { start = true, endpos = true, mask = MASK_SOLID_BRUSHONLY }
12-
local TraceLine = util.TraceLine
12+
local Trace = ACF.trace
1313

1414
function Guidance:OnLaunched(Missile)
1515
self.InPos = Missile.MountPoint.Position
@@ -46,9 +46,9 @@ else
4646
TraceData.start = self.Source:LocalToWorld(self.InPos)
4747
TraceData.endpos = Missile:LocalToWorld(self.OutPos)
4848

49-
local Trace = TraceLine(TraceData)
49+
local Result = Trace(TraceData)
5050

51-
return not Trace.Hit
51+
return not Result.Hit
5252
end
5353

5454
function Guidance:GetGuidance(Missile)

lua/acf/entities/sensors/receivers/receivers.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
local ACF = ACF
22
local Sensors = ACF.Classes.Sensors
3-
local TraceLine = util.TraceLine
3+
local Trace = ACF.trace
44

55
Sensors.Register("WARN-Receiver", {
66
Name = "Warning Receiver",
@@ -50,7 +50,7 @@ do -- Laser Receiver
5050
TraceData.filter = {Receiver, Source.Player}
5151
else TraceData.filter = {Receiver, Source} end
5252

53-
return not TraceLine(TraceData).Hit
53+
return not Trace(TraceData).Hit
5454
end
5555

5656
Sensors.RegisterItem("LAS-Receiver", "WARN-Receiver", {
@@ -114,7 +114,7 @@ do -- Radar Receiver
114114
TraceData.start = Start
115115
TraceData.endpos = End
116116

117-
return not TraceLine(TraceData).Hit
117+
return not Trace(TraceData).Hit
118118
end
119119

120120
Sensors.RegisterItem("RAD-Receiver", "WARN-Receiver", {

lua/entities/acf_radar/init.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ local TraceData = { start = true, endpos = true, mask = MASK_SOLID_BRUSHONLY }
4747
local Indexes = {}
4848
local Unused = {}
4949
local IndexCount = 0
50-
local TraceLine = util.TraceLine
50+
local Trace = ACF.trace
5151
local TimerExists = timer.Exists
5252
local TimerCreate = timer.Create
5353
local TimerRemove = timer.Remove
@@ -100,7 +100,7 @@ local function CheckLOS(Start, End)
100100
TraceData.start = Start
101101
TraceData.endpos = End
102102

103-
return not TraceLine(TraceData).Hit
103+
return not Trace(TraceData).Hit
104104
end
105105

106106
local function GetEntityIndex(Entity)

0 commit comments

Comments
 (0)