diff --git a/gamemodes/zombiesurvival/gamemode/cl_options.lua b/gamemodes/zombiesurvival/gamemode/cl_options.lua index ca79170..b00070e 100644 --- a/gamemodes/zombiesurvival/gamemode/cl_options.lua +++ b/gamemodes/zombiesurvival/gamemode/cl_options.lua @@ -33,6 +33,7 @@ end) CreateClientConVar("zs_noredeem", "0", true, true) CreateClientConVar("zs_alwaysvolunteer", "0", true, true) +CreateClientConVar("zs_nobosspick", "0", true, true) GM.SuicideOnChangeClass = CreateClientConVar("zs_suicideonchange", "1", true, false):GetBool() cvars.AddChangeCallback("zs_suicideonchange", function(cvar, oldvalue, newvalue) diff --git a/gamemodes/zombiesurvival/gamemode/init.lua b/gamemodes/zombiesurvival/gamemode/init.lua index 8b7d691..2fd774d 100644 --- a/gamemodes/zombiesurvival/gamemode/init.lua +++ b/gamemodes/zombiesurvival/gamemode/init.lua @@ -838,11 +838,12 @@ function GM:SpawnBossZombie(bossplayer, silent) livingbosses = livingbosses + 1 if livingbosses >= 3 then return end else - table.insert(zombies, ent) + if ent:GetInfo("zs_nobosspick") == "0" then + table.insert(zombies, ent) + end end end table.sort(zombies, BossZombieSort) - bossplayer = zombies[1] end diff --git a/gamemodes/zombiesurvival/gamemode/vgui/poptions.lua b/gamemodes/zombiesurvival/gamemode/vgui/poptions.lua index b8a1054..fcff255 100644 --- a/gamemodes/zombiesurvival/gamemode/vgui/poptions.lua +++ b/gamemodes/zombiesurvival/gamemode/vgui/poptions.lua @@ -129,6 +129,12 @@ function MakepOptions() check:SetConVar("zs_alwaysvolunteer") check:SizeToContents() list:AddItem(check) + + local check = vgui.Create("DCheckBoxLabel", Window) + check:SetText("Prevent being picked as a boss zombie") + check:SetConVar("zs_nobosspick") + check:SizeToContents() + list:AddItem(check) local check = vgui.Create("DCheckBoxLabel", Window) check:SetText("Automatic suicide when changing classes")