From b746a8f456c0e23e06fbdbe86f01dc0b0dd20839 Mon Sep 17 00:00:00 2001 From: Redox Date: Sun, 13 Oct 2024 21:39:17 +0200 Subject: [PATCH] Use IMaterial if the value is a string --- lua/entities/gmod_wire_egp/lib/egplib/objects.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/entities/gmod_wire_egp/lib/egplib/objects.lua b/lua/entities/gmod_wire_egp/lib/egplib/objects.lua index 5e36965e8f..db30b4784d 100644 --- a/lua/entities/gmod_wire_egp/lib/egplib/objects.lua +++ b/lua/entities/gmod_wire_egp/lib/egplib/objects.lua @@ -85,7 +85,11 @@ function baseObj:EditObject(args) end for k, v in pairs(args) do if self[k] ~= nil and self[k] ~= v then - self[k] = v + if CLIENT and k == "material" and isstring(v) then + self[k] = Material(v) + else + self[k] = v + end ret = true end end