Skip to content

Commit

Permalink
trailing.... again
Browse files Browse the repository at this point in the history
  • Loading branch information
MartyX5555 committed Sep 13, 2023
1 parent ec8fb50 commit eecd99e
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions lua/entities/acf_glatgm/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@ function ENT:Initialize()

-- how far off the forward offset is for the targeting position
self.offsetLength = self.velocity * self.secondsOffset

--You need to declare the CPPI owner before seeing if the optic's owner is equal to the GLATGM's owner!
self:CPPISetOwner(self.BulletData.Owner)

--Gets the Closest computer to spawned missile to override gun´s guidance
--Dont bother at using this if the table is empty
if not table.IsEmpty(ACE.Opticals) then
for i, Optical in pairs(ACE.Opticals) do
--print("Looking for computer...")
if next(ACE.Opticals) then

if not IsValid(Optical) then
continue
for _, Optical in pairs(ACE.Opticals) do
--print("Looking for computer...")

if not IsValid(Optical) then
continue
end

--Range: 250. Note im using squared distance. So 250 ^ 2 means distance is 250
Expand All @@ -76,10 +76,8 @@ function ENT:Initialize()
self.Optic = true

end


end
end
end

--Rocket Trail effect
timer.Simple(0.1,function() ParticleEffectAttach("Rocket_Smoke_Trail",4, self,1) end)
Expand Down

0 comments on commit eecd99e

Please sign in to comment.