Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addon.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"git-hooks-pre-commit",
"gitrid.sh",
"LICENSE",
"wiremod.*"
"wiremod.*",
"benchmark_*"
]
}
4 changes: 2 additions & 2 deletions lua/entities/gmod_wire_customprop/shared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ return {
classname = "gmod_wire_customprop",

readReliableEntity = function(callback)
index = net.ReadUInt(16)
creationIndex = net.ReadUInt(32)
local index = net.ReadUInt(16)
local creationIndex = net.ReadUInt(32)
local startTime = CurTime()

local function check()
Expand Down
12 changes: 6 additions & 6 deletions lua/wire/server/sents_registry.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1137,8 +1137,8 @@ register("gmod_wire_value", {
VECTOR2 = function(val, e2TypeID)
if e2TypeID == TYPE_TABLE and #val >= 2 and isnumber(val[1]) and isnumber(val[2]) then return val[1]..", "..val[2] end
if e2TypeID == TYPE_STRING then
local x,y,z = string.match( val, "^ *([^%s,]+) *, *([^%s,]+) *$" )
if x and y and z then return x..", "..y..", "..z end
local x,y = string.match( val, "^ *([^%s,]+) *, *([^%s,]+) *$" )
if x and y then return x..", "..y end
end

return nil
Expand Down Expand Up @@ -1201,7 +1201,7 @@ register("gmod_wire_value", {
elseif e2TypeID == TYPE_VECTOR then val = {"VECTOR", castE2TypeToWireValueType["VECTOR"](val, e2TypeID)}
elseif e2TypeID == TYPE_ANGLE then val = {"ANGLE", castE2TypeToWireValueType["ANGLE"](val, e2TypeID)}
elseif e2TypeID == TYPE_STRING then val = {"STRING", castE2TypeToWireValueType["STRING"](val, e2TypeID)}
else return "Incorrect 'value' parameter #"..i.." type! Expected table (Ex. table(\"normal\", 0)). Got: "..type( steamid ) end
else return "Incorrect 'value' parameter #"..i.." type! Expected table (Ex. table(\"normal\", 0)). Got: "..type( val ) end
elseif not isnumber(val[1]) then -- Plain table
if TypeID(val[1]) ~= TYPE_STRING then return "Incorrect 'value' parameter #"..i.."[1] type! Expected string ('NORMAL/VECTOR/VECTOR2/VECTOR4/ANGLE/STRING'). Got: "..type( val ) end

Expand All @@ -1214,15 +1214,15 @@ register("gmod_wire_value", {
end
val = {wireValueType, CastFunc(val[2], TypeID(val[2]))}
elseif #val == 2 then -- vector2
local tempVal = castE2TypeToWireValueType["VECTOR2"](val[2], typeID(val[2]))
local tempVal = castE2TypeToWireValueType["VECTOR2"](val, TypeID(val))
if not tempVal then
return "Incorrect 'value' parameter #"..i.." value! Expected 'VECTOR2'. Got: "..tostring(val[2])
end

val = {"VECTOR2", tempVal}
elseif #val==4 then -- vector4
local tempVal = castE2TypeToWireValueType["VECTOR4"](val[2], typeID(val[2]))
if not tempVal then return "Incorrect 'value' parameter #"..i.." value! Expected 'VECTOR2'. Got: "..tostring(val[2]) end
local tempVal = castE2TypeToWireValueType["VECTOR4"](val, TypeID(val))
if not tempVal then return "Incorrect 'value' parameter #"..i.." value! Expected 'VECTOR4'. Got: "..tostring(val[2]) end

val = {"VECTOR4", tempVal}
else
Expand Down
Loading