From c006bdd023cfee549b77e6f17c9fffbd2a347f60 Mon Sep 17 00:00:00 2001 From: kosmik641 Date: Tue, 9 Dec 2025 06:33:56 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BF=D0=B0=D0=B2=D0=BD=D0=B5=D1=80.=20?= =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B8?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B8=20=D1=81=D0=BC=D0=B5=D0=BD=D0=B5=20=D0=BE?= =?UTF-8?q?=D1=80=D1=83=D0=B6=D0=B8=D1=8F.=20self.GhostEntities=20=D1=83?= =?UTF-8?q?=D0=B4=D0=B0=D0=BB=D1=8F=D0=B5=D1=82=D1=81=D1=8F=20=D1=81=D0=B0?= =?UTF-8?q?=D0=BC=D0=B8=D0=BC=20GMod'=D0=BE=D0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gmod_tool/stools/train_spawner.lua | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/lua/weapons/gmod_tool/stools/train_spawner.lua b/lua/weapons/gmod_tool/stools/train_spawner.lua index 2ec100a..b6a699d 100644 --- a/lua/weapons/gmod_tool/stools/train_spawner.lua +++ b/lua/weapons/gmod_tool/stools/train_spawner.lua @@ -163,17 +163,6 @@ function TOOL:Think() e.GetBodyColor = function() return Vector(1,1,1) end e.GetDirtLevel = function() return 0.25 end end - hook.Add("Think",self.GhostEntities[1],function() - if not IsValid(self.Owner:GetActiveWeapon()) or self.Owner:GetActiveWeapon():GetClass()~="gmod_tool" or GetConVar("gmod_toolmode"):GetString() ~= "train_spawner" then - self:OnRemove() - end - end) - - local oldOR = self.GhostEntities[1].OnRemove - self.GhostEntities[1].OnRemove = function(ent) - hook.Remove("Think",ent) - oldOR(ent) - end else self:UpdateGhost() end @@ -388,14 +377,6 @@ function TOOL:SpawnWagon(trace) for k,v in pairs(FIXFIXFIX) do SafeRemoveEntity(v) end end -function TOOL:OnRemove() - self:Finish() -end -function TOOL:Finish() - for _,e in pairs(self.GhostEntities) do SafeRemoveEntity(e) end - self.GhostEntities = {} -end - function TOOL:Reload(trace) if CLIENT then return end local ply = self:GetOwner()