ZombieVision now based on bind.

This commit is contained in:
Mka0207 2019-03-18 15:07:36 -04:00
parent 3249ff5fac
commit e881e4e588
2 changed files with 8 additions and 11 deletions

View file

@ -2240,3 +2240,11 @@ end
function PlayMenuCloseSound() function PlayMenuCloseSound()
MySelf:EmitSound("buttons/lightswitch2.wav", 100, 20) MySelf:EmitSound("buttons/lightswitch2.wav", 100, 20)
end 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

View file

@ -260,17 +260,6 @@ function GM:ToggleZombieVision(onoff)
end end
end end
function GM:PlayerButtonDown( ply, button )
if not IsFirstTimePredicted() then return end
if not IsValid( ply ) or ply != MySelf then return end
if ply:Team() == TEAM_UNDEAD and ply:Alive() then
if button == KEY_F then
self:ToggleZombieVision()
end
end
end
local CModWhiteOut = { local CModWhiteOut = {
["$pp_colour_addr"] = 0, ["$pp_colour_addr"] = 0,
["$pp_colour_addg"] = 0, ["$pp_colour_addg"] = 0,