From 986314838abd0ca9a3aff443d2d333ca5d28cfab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Mon, 29 Jul 2024 19:49:11 +0300 Subject: [PATCH] Fix outputs being cleared on persistent entities --- gamemode/sh_roundsystem.lua | 7 ++----- gamemode/sh_utils.lua | 1 + 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/gamemode/sh_roundsystem.lua b/gamemode/sh_roundsystem.lua index 062f7020..97787263 100644 --- a/gamemode/sh_roundsystem.lua +++ b/gamemode/sh_roundsystem.lua @@ -167,7 +167,7 @@ if SERVER then -- Check what we have to cleanup local filter = {} hook.Call("LambdaCleanupFilter", GAMEMODE, filter) - game.CleanUpMap(false, filter) + game.CleanUpMap(false, filter, function() end) end function GM:RoundStateBooting() @@ -387,7 +387,7 @@ function GM:PreCleanupMap() self.ChangingLevel = false if SERVER then - -- Make sure there are no builtin outputs + -- Make sure there are no pending outputs RunConsoleCommand("ent_cancelpendingentfires") -- Disable all overlays. @@ -405,9 +405,6 @@ function GM:PreCleanupMap() for _, v in pairs(ents.GetAll()) do -- Prevent recursions. v:EnableRespawn(false) - - -- Prevent firing i/o when cleaned up, this otherwise slips to the post cleanup. - v:ClearAllOutputs() end -- NOTE: Sometimes scripted scenes can play after map cleanup. diff --git a/gamemode/sh_utils.lua b/gamemode/sh_utils.lua index 0b77ed08..7ba69a3d 100644 --- a/gamemode/sh_utils.lua +++ b/gamemode/sh_utils.lua @@ -278,6 +278,7 @@ if SERVER then ["PressedAttack2"] = true, ["AttackAxis"] = true, ["Attack2Axis"] = true, + ["OnPass"] = true, } function util.IsOutputValue(key)