From 745b69bffc1685e126f04bacedf2425562f3421c Mon Sep 17 00:00:00 2001 From: JetBoom Date: Sun, 9 Nov 2014 23:38:53 -0500 Subject: [PATCH] Fix a stupid moment. --- gamemodes/zombiesurvival/gamemode/obj_player_extend_sv.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gamemodes/zombiesurvival/gamemode/obj_player_extend_sv.lua b/gamemodes/zombiesurvival/gamemode/obj_player_extend_sv.lua index 2b6a48a..b54683f 100644 --- a/gamemodes/zombiesurvival/gamemode/obj_player_extend_sv.lua +++ b/gamemodes/zombiesurvival/gamemode/obj_player_extend_sv.lua @@ -240,7 +240,7 @@ end function meta:GiveEmptyWeapon(weptype) if not self:HasWeapon(weptype) then local wep = self:Give(weptype) - if wep:IsValid() and wep:IsWeapon() then + if wep and wep:IsValid() and wep:IsWeapon() then wep:EmptyAll() end @@ -250,7 +250,10 @@ end meta.OldGive = meta.Give function meta:Give(weptype) - if self:Team() ~= TEAM_HUMAN then return end + if self:Team() ~= TEAM_HUMAN then + self:OldGive(weptype) + return + end local weps = self:GetWeapons() local autoswitch = #weps == 1 and weps[1]:IsValid() and weps[1].AutoSwitchFrom