diff --git a/lua/entities/gmod_train_bogey/init.lua b/lua/entities/gmod_train_bogey/init.lua index eb09bef..ac6ab1a 100644 --- a/lua/entities/gmod_train_bogey/init.lua +++ b/lua/entities/gmod_train_bogey/init.lua @@ -395,19 +395,14 @@ function ENT:CheckContact(pos,dir,id,cpos) sound.Play("udochka_connect.wav",traceEnt:GetPos()) self.Connectors[id] = traceEnt DropEntityIfHeld(traceEnt) - --[[timer.Simple(0,function() - if not IsValid(traceEnt) or not traceEnt:IsPlayerHolding() then return end - traceEnt:ForcePlayerDrop() - if traceEnt.LastPickup and traceEnt.LastPickup:IsPlayer() then - traceEnt.LastPickup:DropObject() - end - end)]] - end - if (traceEnt.CoupledWith == nil) then - self.Connectors[id] = nil end end return false + elseif self.Connectors[id] == traceEnt then + if traceEnt.Coupled == nil then + self.Connectors[id] = nil + end + return false elseif traceEnt:GetClass() == "player" and self.Voltage > 40 then local pPos = traceEnt:GetPos() self.VoltageDropByTouch = (self.VoltageDropByTouch or 0) + 1