Skip to content

Commit

Permalink
Use MAX_EDICT_BITS in wires networking
Browse files Browse the repository at this point in the history
  • Loading branch information
wrefgtzweve committed Dec 15, 2024
1 parent 1213321 commit 0b67d86
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lua/wire/wireshared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ if SERVER then
if not DontSend then
net.Start("wire_ports")
net.WriteInt(-3, 8) -- set eid
net.WriteUInt(eid, 16) -- entity id
net.WriteUInt(eid, MAX_EDICT_BITS) -- entity id
if hasinputs then net.WriteInt(-1, 8) end -- delete inputs
if hasoutputs then net.WriteInt(-2, 8) end -- delete outputs
net.WriteInt(0, 8) -- break
Expand Down Expand Up @@ -561,7 +561,7 @@ if SERVER then
eid = msg[1]
writeCurrentStrings() -- We're switching to talking about a different entity, lets send port information
net.WriteInt(-3,8)
net.WriteUInt(eid,16)
net.WriteUInt(eid,MAX_EDICT_BITS)
end

local msgtype = msg[2]
Expand Down Expand Up @@ -637,7 +637,7 @@ elseif CLIENT then
elseif cmd == -2 then
ents_with_outputs[eid] = nil
elseif cmd == -3 then
eid = net.ReadUInt(16)
eid = net.ReadUInt(MAX_EDICT_BITS)
elseif cmd == -4 then
connections[#connections+1] = {eid, net.ReadUInt(8), net.ReadBit() ~= 0} -- Delay this process till after the loop
elseif cmd > 0 then
Expand Down

0 comments on commit 0b67d86

Please sign in to comment.