From 50f5cefdee16d3a1c606fb655331433a48a3e53b Mon Sep 17 00:00:00 2001 From: JetBoom Date: Thu, 9 Oct 2014 18:16:39 -0400 Subject: [PATCH] Fixed bug allowing people to use worth menu after redeeming. --- gamemodes/zombiesurvival/gamemode/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gamemodes/zombiesurvival/gamemode/init.lua b/gamemodes/zombiesurvival/gamemode/init.lua index 319a308..6af95c6 100644 --- a/gamemodes/zombiesurvival/gamemode/init.lua +++ b/gamemodes/zombiesurvival/gamemode/init.lua @@ -1871,7 +1871,7 @@ function GM:GiveRandomEquipment(pl) end function GM:PlayerCanCheckout(pl) - return pl:IsValid() and pl:Team() == TEAM_HUMAN and pl:Alive() and not self.CheckedOut[pl:UniqueID()] and not self.StartingLoadout and not self.ZombieEscape and self.StartingWorth > 0 + return pl:IsValid() and pl:Team() == TEAM_HUMAN and pl:Alive() and not self.CheckedOut[pl:UniqueID()] and not self.StartingLoadout and not self.ZombieEscape and self.StartingWorth > 0 and self:GetWave() < 2 end concommand.Add("zs_pointsshopbuy", function(sender, command, arguments) @@ -2467,6 +2467,7 @@ function GM:OnPlayerChangedTeam(pl, oldteam, newteam) pl:SetPoints(0) pl.DamagedBy = {} pl:SetBarricadeGhosting(false) + self.CheckedOut[pl:UniqueID()] = true elseif newteam == TEAM_HUMAN then self.PreviouslyDied[pl:UniqueID()] = nil end