Merge pull request #7 from Vermintide-Mod-Framework/mutators

Remove endless loop detection from mutator manager
This commit is contained in:
UnShame 2018-05-18 00:27:00 +03:00 committed by GitHub
commit be97dc0c5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -195,10 +195,6 @@ local function sort_mutators()
-- /LOG --
--]]
-- Preventing endless loops (worst case is n*(n+1)/2 I believe)
local maxIter = #_MUTATORS * (#_MUTATORS + 1) / 2
local numIter = 0
-- The idea is that all mutators before the current one are already in the right order
-- Starting from second mutator
local i = 2
@ -224,12 +220,6 @@ local function sort_mutators()
end
i = i + 1
numIter = numIter + 1
if numIter > maxIter then
vmf:error("(mutators): too many iterations. Check for loops in 'enable_before_these'/'enable_after_these'.")
return
end
end
_MUTATORS_SORTED = true