Merge pull request #118 from BClark09/master

Added option to prevent being picked as a boss zombie.
This commit is contained in:
William Moodhe / JetBoom 2015-02-03 02:47:00 -05:00
commit 1e089a84e3
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

@ -129,6 +129,12 @@ function MakepOptions()
check:SetConVar("zs_alwaysvolunteer") check:SetConVar("zs_alwaysvolunteer")
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")