From 7d6a99d751a5ff38dbafa6807c3870c043d11ed6 Mon Sep 17 00:00:00 2001 From: LiddulBOFH <13317534+LiddulBOFH@users.noreply.github.com> Date: Wed, 29 May 2024 21:55:57 -0500 Subject: [PATCH] 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. --- lua/entities/gmod_wire_cameracontroller.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/entities/gmod_wire_cameracontroller.lua b/lua/entities/gmod_wire_cameracontroller.lua index b6cc0ac0..5e4e57d8 100644 --- a/lua/entities/gmod_wire_cameracontroller.lua +++ b/lua/entities/gmod_wire_cameracontroller.lua @@ -397,7 +397,7 @@ function ENT:Initialize() self.NextGetContraption = 0 self.NextUpdateOutputs = 0 - self:GetContraption() + self:GetCameraFilterEntities() self:ColorByLinkStatus(self.LINK_STATUS_UNLINKED) end @@ -503,7 +503,7 @@ end -- GetContraption -- Used in UpdateOutputs to make the traces ignore the contraption -------------------------------------------------- -function ENT:GetContraption() +function ENT:GetCameraFilterEntities() if CurTime() < self.NextGetContraption then return end self.NextGetContraption = CurTime() + 5 @@ -626,7 +626,7 @@ function ENT:Think() self:SyncPositions() end - self:GetContraption() + self:GetCameraFilterEntities() self:UpdateOutputs() self:NextThink(CurTime())