From eecd99edb779fab40f09be092f7802eefbfa34c3 Mon Sep 17 00:00:00 2001 From: Mr Marty <57878680+MartyX5555@users.noreply.github.com> Date: Wed, 13 Sep 2023 11:03:22 -0300 Subject: [PATCH] trailing.... again --- lua/entities/acf_glatgm/init.lua | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/lua/entities/acf_glatgm/init.lua b/lua/entities/acf_glatgm/init.lua index c1401678..be0c89b8 100644 --- a/lua/entities/acf_glatgm/init.lua +++ b/lua/entities/acf_glatgm/init.lua @@ -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 @@ -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)