server/states: Fully remove "The Dead Hunt"

This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2020-12-21 02:20:04 +01:00
parent 5562311505
commit 4f7543541c
2 changed files with 8 additions and 22 deletions
@@ -109,21 +109,11 @@ function CLASS:Tick()
-- Team Distribution Logic -- Team Distribution Logic
local hiders, seekers = {}, {} local hiders, seekers = {}, {}
if (GAMEMODE.Config:GameType() == GAMEMODE.Types.Original) then local plyCount, finalPlyCount = #players, math.max(math.ceil(#players / 2), 1)
-- Game Mode: Basic for c = 1,finalPlyCount do
local plyCount, finalPlyCount = #players, math.max(math.ceil(#players / 2), 1) seekers[c] = table.remove(players, 1)
for c = 1,finalPlyCount do
seekers[c] = table.remove(players, 1)
end
hiders = players
elseif (GAMEMODE.Config:GameType() == GAMEMODE.Types.TheDeadHunt) then
-- Game Mode: The Dead Hunt
local plyCount, finalPlyCount = #players, math.max(math.ceil(#players * GAMEMODE.Config.Teams:SeekerPercentage()), 1)
for c = 1,finalPlyCount do
seekers[c] = table.remove(players, 1)
end
hiders = players
end end
hiders = players
-- Kill & Assign Teams -- Kill & Assign Teams
for i, ply in ipairs(hiders) do for i, ply in ipairs(hiders) do
@@ -40,14 +40,10 @@ function CLASS:Tick()
RoundManager:SetState(StatePreRound) RoundManager:SetState(StatePreRound)
end end
-- Game Mode: Basic -- Both Teams must have at least 1 player.
if (GAMEMODE.Config:GameType() == GAMEMODE.Types.Original) then if ((team.NumPlayers(GAMEMODE.Teams.Seekers) >= 1) && (team.NumPlayers(GAMEMODE.Teams.Hiders) >= 1)) then
-- Both Teams must have at least 1 player. RoundManager:SetState(StatePreRound)
if ((team.NumPlayers(GAMEMODE.Teams.Seekers) >= 1) && (team.NumPlayers(GAMEMODE.Teams.Hiders) >= 1)) then if GAMEMODE.Config:DebugLog() then print("StatePreMatch: <Original> Have enough players to start match.") end
RoundManager:SetState(StatePreRound)
if GAMEMODE.Config:DebugLog() then print("StatePreMatch: <Original> Have enough players to start match.") end
end
-- TODO: Other Gamemodes
end end
end end