diff --git a/lua/acf/shared/fuses/d_radio.lua b/lua/acf/shared/fuses/d_radio.lua index 3646516b..39fa4e23 100644 --- a/lua/acf/shared/fuses/d_radio.lua +++ b/lua/acf/shared/fuses/d_radio.lua @@ -89,16 +89,18 @@ do if not self:IsArmed() then return false end - local MissilePos = missile:GetPos() + local MissilePos = missile.CurPos local Dist = self.Distance local trace = {} - trace.start = MissilePos - trace.endpos = MissilePos + missile.LastVel * 0.5 --small compensation for incoming impacts. - trace.filter = FilterFunction - trace.mins = Vector(-Dist, -Dist, -Dist) - trace.maxs = -trace.mins - trace.ignoreworld = true + trace.start = missile.DPos or MissilePos print(MissilePos) + trace.endpos = MissilePos --small compensation for incoming impacts. + trace.filter = FilterFunction + trace.mins = Vector(-Dist, -Dist, -Dist) + trace.maxs = -trace.mins + trace.ignoreworld = true + + missile.DPos = MissilePos local tr = util.TraceHull(trace) diff --git a/lua/entities/acf_missile/init.lua b/lua/entities/acf_missile/init.lua index ac58654f..20586986 100644 --- a/lua/entities/acf_missile/init.lua +++ b/lua/entities/acf_missile/init.lua @@ -356,8 +356,8 @@ function ENT:CalcFlight() self.FlightTime = Flight --Missile trajectory debugging - debugoverlay.Line(Pos, EndPos, 10, Color(0, 255, 0)) - debugoverlay.Line(EndPos, EndPos + Dir:GetNormalized() * 50, 10, Color(0, 0, 255)) + --.Line(Pos, EndPos, 10, Color(0, 255, 0)) + --debugoverlay.Line(EndPos, EndPos + Dir:GetNormalized() * 50, 10, Color(0, 0, 255)) self:DoFlight() end