Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions lua/entities/gmod_wire_buoyancy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,6 @@ function ENT:TriggerInput(name, value)
end
end

-- Buoyancy is reset by the physgun and gravgun
local function RestoreBuoyancy(ply, ent)
if ent.WireBuoyancyController then
timer.Simple(0 , function()
if not ent:IsValid() or not ent.WireBuoyancyController then return end
SetBuoyancy(ent, ent.WireBuoyancyController)
end)
end
end

hook.Add("PhysgunDrop", "WireBuoyancy", RestoreBuoyancy)
hook.Add("GravGunOnDropped", "WireBuoyancy", RestoreBuoyancy)

function ENT:CheckEnt(checkent)
for index, ent in ipairs(self.Marks) do
if checkent == ent then
Expand All @@ -86,7 +73,6 @@ function ENT:LinkEnt(ent)
self:UnlinkEnt(ent)
end)

ent.WireBuoyancyController = self
self:UpdateOutputs()

return true
Expand All @@ -98,7 +84,6 @@ function ENT:UnlinkEnt(ent)
if bool then
table.remove(self.Marks, index)
ent:RemoveCallOnRemove("Buoyancy.Unlink" .. self:EntIndex())
ent.WireBuoyancyController = nil
self:UpdateOutputs()
end

Expand All @@ -108,7 +93,6 @@ end
function ENT:ClearEntities()
for index, ent in ipairs(self.Marks) do
ent:RemoveCallOnRemove("Buoyancy.Unlink" .. self:EntIndex())
ent.WireBuoyancyController = nil
end

self.Marks = {}
Expand Down
Loading