Skip to content

Commit d8bfd12

Browse files
authored
Remove useless WireLib.ErrorNoHalt function + remove useless GMOD 13 check (#3640)
* Remove useless WireLib.ErrorNoHalt function * Remove useless GMOD 13 check
1 parent 0caed1c commit d8bfd12

6 files changed

Lines changed: 7 additions & 20 deletions

File tree

lua/autorun/wire_load.lua

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,6 @@ See the License for the specific language governing permissions and
1515
limitations under the License.
1616
]]--
1717

18-
if VERSION < 140403 and VERSION > 5 then
19-
-- VERSION > 5 check added June 2013, to address issues regarding the Steampipe update sometimes setting VERSION to 1.
20-
ErrorNoHalt("WireMod: This branch of wiremod only supports Gmod13+.\n")
21-
return
22-
end
23-
2418
if SERVER then
2519
-- this file
2620
AddCSLuaFile("autorun/wire_load.lua")

lua/entities/gmod_wire_expression2/core/extloader.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ local function e2_include_finalize()
114114
for _, info in ipairs(included_files) do
115115
local ok, message = pcall(e2_include_pass2, unpack(info))
116116
if not ok then
117-
WireLib.ErrorNoHalt(string.format("There was an error loading " ..
117+
ErrorNoHalt(string.format("There was an error loading " ..
118118
"the %s extension. Please report this to its developer.\n%s\n",
119119
info[1], message))
120120
end

lua/entities/gmod_wire_gpu/cl_init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ function ENT:Draw(flags)
452452
self:RenderVertex(1024,1024*monitor.RatioX)
453453
self:RenderMisc(pos, ang, res, 1/monitor.RatioX, monitor)
454454
end, debug.traceback)
455-
if not ok then WireLib.ErrorNoHalt(err) end
455+
if not ok then ErrorNoHalt(err) end
456456
if self.In3D2D then self.In3D2D = false cam.End3D2D() end
457457
self.VertexCamSettings = nil
458458
end

lua/wire/gpulib.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ if CLIENT then
299299
render.SetViewPort(0, 0, 1024, 1024)
300300
cam.Start2D()
301301
local ok, err = xpcall(renderfunction, debug.traceback)
302-
if not ok then WireLib.ErrorNoHalt(err) end
302+
if not ok then ErrorNoHalt(err) end
303303
cam.End2D()
304304
render.SetViewPort(0, 0, oldw, oldh)
305305
render.SetRenderTarget(OldRT)
@@ -326,7 +326,7 @@ if CLIENT then
326326
local res = monitor.RS*1024/h
327327
cam.Start3D2D(pos, ang, res)
328328
local ok, err = xpcall(renderfunction, debug.traceback, x, y, w, h, monitor, pos, ang, res)
329-
if not ok then WireLib.ErrorNoHalt(err) end
329+
if not ok then ErrorNoHalt(err) end
330330
cam.End3D2D()
331331
end
332332

@@ -371,7 +371,7 @@ if CLIENT then
371371

372372
if postrenderfunction then postrenderfunction(pos, ang, res, aspect, monitor) end
373373
end, debug.traceback)
374-
if not ok then WireLib.ErrorNoHalt(err) end
374+
if not ok then ErrorNoHalt(err) end
375375
cam.End3D2D()
376376

377377
WireGPU_matScreen:SetTexture("$basetexture", OldTex)

lua/wire/timedpairs.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ local function Timedpairs()
5252
local ok, err = xpcall( data.callback, debug.traceback, kv.key, kv.value, unpack(data.args) ) -- DO EET
5353

5454
if not ok then -- oh noes
55-
WireLib.ErrorNoHalt( "Error in Timedpairs '" .. name .. "': " .. err )
55+
ErrorNoHalt( "Error in Timedpairs '" .. name .. "': " .. err )
5656
toremove[#toremove+1] = name
5757
break
5858
elseif err == false then -- They returned false inside the function
@@ -65,7 +65,7 @@ local function Timedpairs()
6565
local ok, err = xpcall( data.endcallback, debug.traceback, kv.key, kv.value, unpack(data.args) )
6666

6767
if not ok then
68-
WireLib.ErrorNoHalt( "Error in Timedpairs '" .. name .. "' (in end function): " .. err )
68+
ErrorNoHalt( "Error in Timedpairs '" .. name .. "' (in end function): " .. err )
6969
end
7070
end
7171
toremove[#toremove+1] = name

lua/wire/wireshared.lua

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -407,13 +407,6 @@ WireLib.NetQueue = {
407407
setmetatable(WireLib.NetQueue, WireLib.NetQueue)
408408
end
409409

410-
function WireLib.ErrorNoHalt(message)
411-
-- ErrorNoHalt clips messages to 512 characters, so chain calls if necessary
412-
for i=1,#message, 511 do
413-
ErrorNoHalt(message:sub(i,i+510))
414-
end
415-
end
416-
417410
--- Generate a random version 4 UUID and return it as a string.
418411
function WireLib.GenerateUUID()
419412
-- It would be easier to generate this by word rather than by byte, but

0 commit comments

Comments
 (0)