Skip to content

Commit

Permalink
Removed the need for a leavekey field in the activation message packet.
Browse files Browse the repository at this point in the history
  • Loading branch information
TomyLobo committed Apr 7, 2015
1 parent 441e9f8 commit e29e9e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lua/entities/gmod_wire_keyboard/cl_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ end)

net.Receive("wire_keyboard_activatemessage", function(netlen)
local pod = net.ReadBit() ~= 0
local leaveKey = net.ReadUInt(16)

local leaveKey = LocalPlayer():GetInfoNum("wire_keyboard_leavekey", KEY_LALT)
local leaveKeyName = string.upper(input.GetKeyName(leaveKey))

local text
Expand Down
3 changes: 0 additions & 3 deletions lua/entities/gmod_wire_keyboard/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,8 @@ function ENT:PlayerAttach(ply)
net.Send(ply)
end

local leavekey = ply:GetInfoNum("wire_keyboard_leavekey", KEY_LALT)

net.Start("wire_keyboard_activatemessage")
net.WriteBit(IsValid(self.Pod))
net.WriteUInt(leavekey, 16)
net.Send(ply)

-- Set the wire keyboard value on the player
Expand Down

0 comments on commit e29e9e7

Please sign in to comment.