From da056be0c26a3af24c34e114a19d1f89437fc048 Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Sun, 12 Nov 2023 14:39:19 +0500 Subject: [PATCH] smol cleanup --- beatrun/gamemodes/beatrun/gamemode/sh/BuildMode.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/beatrun/gamemodes/beatrun/gamemode/sh/BuildMode.lua b/beatrun/gamemodes/beatrun/gamemode/sh/BuildMode.lua index ace38af..7f91fc5 100644 --- a/beatrun/gamemodes/beatrun/gamemode/sh/BuildMode.lua +++ b/beatrun/gamemodes/beatrun/gamemode/sh/BuildMode.lua @@ -619,6 +619,7 @@ if SERVER then a:Spawn() local phys = a:GetPhysicsObject() + if IsValid(phys) then phys:EnableMotion(false) phys:Sleep() @@ -1407,11 +1408,11 @@ if CLIENT then end hook.Add("InitPostEntity", "buildmode_create_hook", function() - timer.Simple(2, function() + timer.Simple(2, function() hook.Add("OnEntityCreated", "BuildModeProps", function(ent) if not ent:GetNW2Bool("BRProtected") and ent:GetClass() == "prop_physics" or buildmode_ents[ent:GetClass()] then if not BuildMode then ent.buildmode_placed_manually = true end - + table.insert(buildmode_placed, ent) end end)