5151
5252-- For some reason, buoyancy is reset by the physgun and gravgun
5353local function RestoreBuoyancy (ply , ent )
54- if IsValid ( ent .WireBuoyancyController ) then
54+ if ent .WireBuoyancyController then
5555 timer .Simple (0 , function ()
56- if not IsValid (ent ) or not IsValid ( ent .WireBuoyancyController ) then return end
56+ if not ent : IsValid () or not ent .WireBuoyancyController then return end
5757 SetBuoyancy (ent , ent .WireBuoyancyController )
5858 end )
5959 end
@@ -79,9 +79,7 @@ function ENT:LinkEnt(ent)
7979 SetBuoyancy (ent , self )
8080
8181 ent :CallOnRemove (" WireBuoyancy_Unlink_" .. self :EntIndex (), function (ent )
82- if self :IsValid () then
83- self :UnlinkEnt (ent )
84- end
82+ self :UnlinkEnt (ent )
8583 end )
8684
8785 ent .WireBuoyancyController = self
@@ -118,7 +116,7 @@ function ENT:OnRemove()
118116end
119117
120118function ENT :BuildDupeInfo ()
121- local info = BaseClass .BuildDupeInfo (self ) or {}
119+ local info = BaseClass .BuildDupeInfo (self )
122120
123121 if # self .Marks > 0 then
124122 local tab = {}
@@ -137,8 +135,6 @@ function ENT:ApplyDupeInfo(ply, ent, info, GetEntByID)
137135 BaseClass .ApplyDupeInfo (self , ply , ent , info , GetEntByID )
138136
139137 if info .marks then
140- self .Marks = self .Marks or {}
141-
142138 for index , entid in ipairs (info .marks ) do
143139 local ent = GetEntByID (entid )
144140
0 commit comments