ZombieVision now based on bind.
This commit is contained in:
parent
3249ff5fac
commit
e881e4e588
2 changed files with 8 additions and 11 deletions
|
@ -2240,3 +2240,11 @@ 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
|
|
@ -260,17 +260,6 @@ function GM:ToggleZombieVision(onoff)
|
|||
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 = {
|
||||
["$pp_colour_addr"] = 0,
|
||||
["$pp_colour_addg"] = 0,
|
||||
|
|
Loading…
Reference in a new issue