Skip to content

Commit

Permalink
Fix outputs being cleared on persistent entities
Browse files Browse the repository at this point in the history
  • Loading branch information
ZehMatt committed Jul 29, 2024
1 parent 739d81a commit 9863148
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
7 changes: 2 additions & 5 deletions gamemode/sh_roundsystem.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand Down
1 change: 1 addition & 0 deletions gamemode/sh_utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ if SERVER then
["PressedAttack2"] = true,
["AttackAxis"] = true,
["Attack2Axis"] = true,
["OnPass"] = true,
}

function util.IsOutputValue(key)
Expand Down

0 comments on commit 9863148

Please sign in to comment.