Added option to prevent being picked as a boss zombie.

Accessible by option menu checkbox or "zs_nobosspick 1"
This commit is contained in:
Ben 2015-02-03 04:13:48 +00:00
parent b696386ca1
commit 0c263ccea5
3 changed files with 10 additions and 2 deletions

View file

@ -33,6 +33,7 @@ end)
CreateClientConVar("zs_noredeem", "0", true, true) CreateClientConVar("zs_noredeem", "0", true, true)
CreateClientConVar("zs_alwaysvolunteer", "0", true, true) CreateClientConVar("zs_alwaysvolunteer", "0", true, true)
CreateClientConVar("zs_nobosspick", "0", true, true)
GM.SuicideOnChangeClass = CreateClientConVar("zs_suicideonchange", "1", true, false):GetBool() GM.SuicideOnChangeClass = CreateClientConVar("zs_suicideonchange", "1", true, false):GetBool()
cvars.AddChangeCallback("zs_suicideonchange", function(cvar, oldvalue, newvalue) cvars.AddChangeCallback("zs_suicideonchange", function(cvar, oldvalue, newvalue)

View file

@ -838,11 +838,12 @@ function GM:SpawnBossZombie(bossplayer, silent)
livingbosses = livingbosses + 1 livingbosses = livingbosses + 1
if livingbosses >= 3 then return end if livingbosses >= 3 then return end
else else
table.insert(zombies, ent) if ent:GetInfo("zs_nobosspick") == "0" then
table.insert(zombies, ent)
end
end end
end end
table.sort(zombies, BossZombieSort) table.sort(zombies, BossZombieSort)
bossplayer = zombies[1] bossplayer = zombies[1]
end end

View file

@ -130,6 +130,12 @@ function MakepOptions()
check:SizeToContents() check:SizeToContents()
list:AddItem(check) 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) local check = vgui.Create("DCheckBoxLabel", Window)
check:SetText("Automatic suicide when changing classes") check:SetText("Automatic suicide when changing classes")
check:SetConVar("zs_suicideonchange") check:SetConVar("zs_suicideonchange")