Fixed all classes printing as unlocked every wave.
This commit is contained in:
parent
442f46a3f7
commit
18126da912
2 changed files with 10 additions and 1 deletions
|
@ -3545,7 +3545,12 @@ function GM:SetWave(wave)
|
|||
|
||||
for classid in pairs(previouslylocked) do
|
||||
if gamemode.Call("IsClassUnlocked", classid) then
|
||||
table.insert(UnlockedClasses, classid)
|
||||
local classtab = self.ZombieClasses[classid]
|
||||
if not classtab.UnlockedNotify then
|
||||
classtab.UnlockedNotify = true
|
||||
table.insert(UnlockedClasses, classid)
|
||||
end
|
||||
|
||||
for _, ent in pairs(ents.FindByClass("logic_classunlock")) do
|
||||
local classname = GAMEMODE.ZombieClasses[classid].Name
|
||||
if ent.Class == string.lower(classname) then
|
||||
|
|
|
@ -91,6 +91,10 @@ function GM:RegisterZombieClasses()
|
|||
ErrorNoHalt("CLASS "..tostring(v.Name).." uses base class "..base.." but it doesn't exist!")
|
||||
end
|
||||
end
|
||||
|
||||
if v.Unlocked or v.Wave == 0 then
|
||||
v.UnlockedNotify = true
|
||||
end
|
||||
end
|
||||
|
||||
self:ReorderZombieClasses()
|
||||
|
|
Loading…
Reference in a new issue