Skip to content

Commit

Permalink
Got rid of vnet
Browse files Browse the repository at this point in the history
  • Loading branch information
filipovskis committed Nov 14, 2021
1 parent 1049f74 commit 5384005
Show file tree
Hide file tree
Showing 5 changed files with 442 additions and 2,290 deletions.
1 change: 1 addition & 0 deletions lua/gfconsole/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Email: tochonement@gmail.com
--]]

gfconsole.load.Shared("config.lua")
gfconsole.load.Shared("util.lua")
gfconsole.load.Folder("gfconsole/libraries/thirdparty")
gfconsole.load.Folder("gfconsole/libraries")
gfconsole.load.Folder("gfconsole/core/derma")
Expand Down
17 changes: 8 additions & 9 deletions lua/gfconsole/libraries/sh_message.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,10 @@ if SERVER then
local filter = message.filter
local data = message.data

local packet = gfconsole.net.CreatePacket("gfconsole:Send")
packet:String(filter)
packet:Table(data)
packet:AddTargets(recipients)
packet:Send()
net.Start("gfconsole:Send")
net.WriteString(filter)
gfconsole.util.write_pon(data)
net.Send(recipients)

table.remove(queue, 1)
end
Expand Down Expand Up @@ -125,10 +124,10 @@ if CLIENT then
add(false, filter, ...)
end

gfconsole.net.Watch("gfconsole:Send", function(packet)
local filter = packet:String()
local arguments = packet:Table()
net.Receive("gfconsole:Send", function()
local filter = net.ReadString()
local arguments = gfconsole.util.read_pon()

add(true, filter, unpack(arguments))
end, gfconsole.net.OPTION_WATCH_OVERRIDE)
end)
end
Loading

0 comments on commit 5384005

Please sign in to comment.