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
|
for classid in pairs(previouslylocked) do
|
||||||
if gamemode.Call("IsClassUnlocked", classid) then
|
if gamemode.Call("IsClassUnlocked", classid) then
|
||||||
|
local classtab = self.ZombieClasses[classid]
|
||||||
|
if not classtab.UnlockedNotify then
|
||||||
|
classtab.UnlockedNotify = true
|
||||||
table.insert(UnlockedClasses, classid)
|
table.insert(UnlockedClasses, classid)
|
||||||
|
end
|
||||||
|
|
||||||
for _, ent in pairs(ents.FindByClass("logic_classunlock")) do
|
for _, ent in pairs(ents.FindByClass("logic_classunlock")) do
|
||||||
local classname = GAMEMODE.ZombieClasses[classid].Name
|
local classname = GAMEMODE.ZombieClasses[classid].Name
|
||||||
if ent.Class == string.lower(classname) then
|
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!")
|
ErrorNoHalt("CLASS "..tostring(v.Name).." uses base class "..base.." but it doesn't exist!")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if v.Unlocked or v.Wave == 0 then
|
||||||
|
v.UnlockedNotify = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
self:ReorderZombieClasses()
|
self:ReorderZombieClasses()
|
||||||
|
|
Loading…
Reference in a new issue