Skip to content

Commit

Permalink
added parameters for invalid owners for tracking devices. Giving same…
Browse files Browse the repository at this point in the history
… order to the irst too.
  • Loading branch information
MartyX5555 committed Oct 21, 2023
1 parent bd37599 commit 7f4cd01
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 5 additions & 1 deletion lua/entities/ace_irst/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,11 @@ function ENT:AcquireLock()
local angerr = Angle(finalerror, finalerror, finalerror) * randanginac

--For Owner table
table.insert(Owners, IsValid(scanEnt:CPPIGetOwner()) and scanEnt:CPPIGetOwner():GetName() or "")
local Owner = scanEnt:CPPIGetOwner()
local NickName = IsValid(Owner) and Owner:GetName() or ""


table.insert(Owners, NickName)
table.insert(Temperatures, Heat)
table.insert(AngTable, -ang + angerr) -- Negative means that if the target is higher than irst = positive pitch

Expand Down
7 changes: 5 additions & 2 deletions lua/entities/ace_trackingradar/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,12 @@ function ENT:Think()
self.ClosestToBeam = #ownArray + 1
besterr = err
end
--print((entpos - thisPos):Length())

table.insert(ownArray , scanEnt:CPPIGetOwner():GetName() or "")
--For Owner table
local Owner = scanEnt:CPPIGetOwner()
local NickName = IsValid(Owner) and Owner:GetName() or ""

table.insert(ownArray , NickName)
table.insert(posArray ,entpos + randinac * errorFromAng * 2000 + randinac * ((entpos - thisPos):Length() * (self.InaccuracyMul * 0.8 + GCdis * 0.1 ))) --3

--IDK if this is more intensive than length
Expand Down

0 comments on commit 7f4cd01

Please sign in to comment.