Skip to content

Commit

Permalink
Make more stuff work with visclips
Browse files Browse the repository at this point in the history
  • Loading branch information
thecraftianman committed Dec 19, 2024
1 parent c97753d commit c505ccb
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
3 changes: 2 additions & 1 deletion lua/acf/entities/fuzes/optical.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ if CLIENT then
else
local TraceData = { start = true, endpos = true, filter = true }
local Entities = Classes.Entities
local Trace = ACF.trace

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

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

return util.TraceLine(TraceData).Hit
return Trace(TraceData).Hit
end

function Fuze:OnLast(Entity)
Expand Down
4 changes: 2 additions & 2 deletions lua/acf/entities/guidance/laser.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if CLIENT then
Guidance.Description = "This guidance package reads a target-position from the launcher and guides the munition towards it."
else
local TraceData = { start = true, endpos = true, mask = MASK_SOLID_BRUSHONLY }
local TraceLine = util.TraceLine
local Trace = ACF.trace
local Lasers = ACF.ActiveLasers

function Guidance.GetDirectionDot(Missile, TargetPos)
Expand All @@ -34,7 +34,7 @@ else
TraceData.start = Position
TraceData.endpos = TargetPos

return not TraceLine(TraceData).Hit
return not Trace(TraceData).Hit
end

function Guidance:CheckComputer(Missile)
Expand Down
6 changes: 3 additions & 3 deletions lua/acf/entities/guidance/radio_mclos.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if CLIENT then
Guidance.Description = "This guidance package allows you to manually control the direction of the missile."
else
local TraceData = { start = true, endpos = true, mask = MASK_SOLID_BRUSHONLY }
local TraceLine = util.TraceLine
local Trace = ACF.trace

function Guidance:OnLaunched(Missile)
self.InPos = Missile.MountPoint.Position
Expand Down Expand Up @@ -46,9 +46,9 @@ else
TraceData.start = self.Source:LocalToWorld(self.InPos)
TraceData.endpos = Missile:LocalToWorld(self.OutPos)

local Trace = TraceLine(TraceData)
local Result = Trace(TraceData)

return not Trace.Hit
return not Result.Hit
end

function Guidance:GetGuidance(Missile)
Expand Down
6 changes: 3 additions & 3 deletions lua/acf/entities/sensors/receivers/receivers.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
local ACF = ACF
local Sensors = ACF.Classes.Sensors
local TraceLine = util.TraceLine
local Trace = ACF.trace

Sensors.Register("WARN-Receiver", {
Name = "Warning Receiver",
Expand Down Expand Up @@ -50,7 +50,7 @@ do -- Laser Receiver
TraceData.filter = {Receiver, Source.Player}
else TraceData.filter = {Receiver, Source} end

return not TraceLine(TraceData).Hit
return not Trace(TraceData).Hit
end

Sensors.RegisterItem("LAS-Receiver", "WARN-Receiver", {
Expand Down Expand Up @@ -114,7 +114,7 @@ do -- Radar Receiver
TraceData.start = Start
TraceData.endpos = End

return not TraceLine(TraceData).Hit
return not Trace(TraceData).Hit
end

Sensors.RegisterItem("RAD-Receiver", "WARN-Receiver", {
Expand Down
4 changes: 2 additions & 2 deletions lua/entities/acf_radar/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ local TraceData = { start = true, endpos = true, mask = MASK_SOLID_BRUSHONLY }
local Indexes = {}
local Unused = {}
local IndexCount = 0
local TraceLine = util.TraceLine
local Trace = ACF.trace
local TimerExists = timer.Exists
local TimerCreate = timer.Create
local TimerRemove = timer.Remove
Expand Down Expand Up @@ -100,7 +100,7 @@ local function CheckLOS(Start, End)
TraceData.start = Start
TraceData.endpos = End

return not TraceLine(TraceData).Hit
return not Trace(TraceData).Hit
end

local function GetEntityIndex(Entity)
Expand Down

0 comments on commit c505ccb

Please sign in to comment.