From 6d8078a65ad858aaa39ca0c9c2c191583b23911b Mon Sep 17 00:00:00 2001 From: Brandon Sturgeon Date: Tue, 18 Jul 2023 20:27:32 -0700 Subject: [PATCH 1/3] Add new pac_debug convar, update dprints --- lua/pac3/core/server/util.lua | 16 ---------------- lua/pac3/core/shared/util.lua | 9 ++++++--- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/lua/pac3/core/server/util.lua b/lua/pac3/core/server/util.lua index 4e8918a62..4ff3d3436 100644 --- a/lua/pac3/core/server/util.lua +++ b/lua/pac3/core/server/util.lua @@ -1,22 +1,6 @@ local CurTime = CurTime local math_Clamp = math.Clamp -function pac.dprint(fmt, ...) - if pac.debug then - MsgN("\n") - MsgN(">>>PAC3>>>") - MsgN(fmt:format(...)) - if pac.debug_trace then - MsgN("==TRACE==") - debug.Trace() - MsgN("==TRACE==") - end - MsgN("<<>>PAC3>>>") MsgN(fmt:format(...)) - if pac.debug_trace then + if debugInt == 2 then MsgN("==TRACE==") debug.Trace() MsgN("==TRACE==") From 6a75e2ada4d27ccd9dbba581568071194326fd0f Mon Sep 17 00:00:00 2001 From: Brandon Sturgeon Date: Tue, 18 Jul 2023 20:28:46 -0700 Subject: [PATCH 2/3] Remove unnecessary dprint definition --- lua/pac3/editor/server/util.lua | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/lua/pac3/editor/server/util.lua b/lua/pac3/editor/server/util.lua index c59e607c2..f79913d29 100644 --- a/lua/pac3/editor/server/util.lua +++ b/lua/pac3/editor/server/util.lua @@ -1,19 +1,3 @@ -function pace.dprint(fmt, ...) - if pace.debug then - MsgN("\n") - MsgN(">>>PAC3>>>") - MsgN(fmt:format(...)) - if pace.debug_trace then - MsgN("==TRACE==") - debug.Trace() - MsgN("==TRACE==") - end - MsgN("<< Date: Tue, 18 Jul 2023 20:30:46 -0700 Subject: [PATCH 3/3] Remove pace.dprint --- lua/pac3/editor/server/wear.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/pac3/editor/server/wear.lua b/lua/pac3/editor/server/wear.lua index 9ad43efcc..91582c623 100644 --- a/lua/pac3/editor/server/wear.lua +++ b/lua/pac3/editor/server/wear.lua @@ -112,7 +112,7 @@ function pace.SubmitPart(data, filter) if istable(data.part) then if last_frame == frame_number then table.insert(pace.StreamQueue, {data, filter}) - pace.dprint("queuing part %q from %s", data.part.self.Name, tostring(data.owner)) + pac.dprint("queuing part %q from %s", data.part.self.Name, tostring(data.owner)) return "queue" end end @@ -299,7 +299,7 @@ function pace.SubmitPart(data, filter) end function pace.SubmitPartNotify(data) - pace.dprint("submitted outfit %q from %s with %i number of children to set on %s", data.part.self.Name or "", data.owner:GetName(), table.Count(data.part.children), data.part.self.OwnerName or "") + pac.dprint("submitted outfit %q from %s with %i number of children to set on %s", data.part.self.Name or "", data.owner:GetName(), table.Count(data.part.children), data.part.self.OwnerName or "") local allowed, reason = pace.SubmitPart(data) @@ -321,7 +321,7 @@ function pace.SubmitPartNotify(data) end function pace.RemovePart(data) - pace.dprint("%s is removed %q", data.owner and data.owner:IsValid() and data.owner:GetName(), data.part) + pac.dprint("%s is removed %q", data.owner and data.owner:IsValid() and data.owner:GetName(), data.part) if data.part == "__ALL__" then pace.CallHook("RemoveOutfit", data.owner)