mirror of
https://github.com/wiremod/wire.git
synced 2025-03-04 03:03:04 -05:00
Change GetContraption meta function to something different (#3077)
Renamed from ENT:GetContraption() to ENT:GetCameraFilterEntities() Fixes a conflict with Contraption Framework - CFW adds a meta function to all entities, ENT:GetContraption, which returns the contraption an entity is a part of - Prior to this PR, Wire Camera Controllers have a function of the same name that is called nowhere else within wire, and hopefully nowhere outside of wire either. This function serves as a way to get all of the entities part of a vehicle the camera pod is attached to, and then adds on whatever FilterEntities has.
This commit is contained in:
parent
6477912829
commit
7d6a99d751
@ -397,7 +397,7 @@ function ENT:Initialize()
|
|||||||
self.NextGetContraption = 0
|
self.NextGetContraption = 0
|
||||||
self.NextUpdateOutputs = 0
|
self.NextUpdateOutputs = 0
|
||||||
|
|
||||||
self:GetContraption()
|
self:GetCameraFilterEntities()
|
||||||
|
|
||||||
self:ColorByLinkStatus(self.LINK_STATUS_UNLINKED)
|
self:ColorByLinkStatus(self.LINK_STATUS_UNLINKED)
|
||||||
end
|
end
|
||||||
@ -503,7 +503,7 @@ end
|
|||||||
-- GetContraption
|
-- GetContraption
|
||||||
-- Used in UpdateOutputs to make the traces ignore the contraption
|
-- Used in UpdateOutputs to make the traces ignore the contraption
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
function ENT:GetContraption()
|
function ENT:GetCameraFilterEntities()
|
||||||
if CurTime() < self.NextGetContraption then return end
|
if CurTime() < self.NextGetContraption then return end
|
||||||
self.NextGetContraption = CurTime() + 5
|
self.NextGetContraption = CurTime() + 5
|
||||||
|
|
||||||
@ -626,7 +626,7 @@ function ENT:Think()
|
|||||||
self:SyncPositions()
|
self:SyncPositions()
|
||||||
end
|
end
|
||||||
|
|
||||||
self:GetContraption()
|
self:GetCameraFilterEntities()
|
||||||
self:UpdateOutputs()
|
self:UpdateOutputs()
|
||||||
|
|
||||||
self:NextThink(CurTime())
|
self:NextThink(CurTime())
|
||||||
|
Loading…
Reference in New Issue
Block a user