From f79846b7adf7639c149ebae40b2c0df1e5fc6baa Mon Sep 17 00:00:00 2001 From: Mka0207 Date: Mon, 18 Mar 2019 15:18:49 -0400 Subject: [PATCH] Merged bindpress funcs. --- gamemodes/zombiesurvival/gamemode/cl_init.lua | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/gamemodes/zombiesurvival/gamemode/cl_init.lua b/gamemodes/zombiesurvival/gamemode/cl_init.lua index 3c883de..38fbf01 100644 --- a/gamemodes/zombiesurvival/gamemode/cl_init.lua +++ b/gamemodes/zombiesurvival/gamemode/cl_init.lua @@ -1780,6 +1780,10 @@ function GM:PlayerBindPress(pl, bind, wasin) elseif P_Team(pl) == TEAM_HUMAN then self:ToggleOTSCamera() end + elseif bind == "impulse 100" then + if P_Team(pl) == TEAM_UNDEAD and pl:Alive() then + self:ToggleZombieVision() + end end end @@ -2239,12 +2243,4 @@ end function PlayMenuCloseSound() MySelf:EmitSound("buttons/lightswitch2.wav", 100, 20) -end - -function GM:PlayerBindPress(ply, bind, pressed) - if IsValid( ply ) and ply:Team() == TEAM_UNDEAD and ply:Alive() and not IsFirstTimePredicted() then - if (bind == "impulse 100") then - self:ToggleZombieVision() - end - end end \ No newline at end of file