From d9f543189937b7a6bd8710b74686401188035bd0 Mon Sep 17 00:00:00 2001 From: techbot Date: Thu, 26 Oct 2023 22:28:55 +0200 Subject: [PATCH] fix multiple lights not working --- lua/pac3/core/client/parts/light.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/pac3/core/client/parts/light.lua b/lua/pac3/core/client/parts/light.lua index c729f9a9..e064dfc6 100644 --- a/lua/pac3/core/client/parts/light.lua +++ b/lua/pac3/core/client/parts/light.lua @@ -20,7 +20,7 @@ BUILDER:EndStorableVars() function PART:GetLight() if not self.light then - self.light = DynamicLight(tonumber(pac.LocalPlayer:EntIndex())) + self.light = DynamicLight(tonumber(self:GetPrintUniqueID(),16)) end self.light.decay = 0 self.light.dietime = math.huge @@ -40,7 +40,6 @@ function PART:RemoveLight() end function PART:GetNiceName() - -- forgot the reason why this was changed to be a 0-1 range anyway local color = self:GetColor() local hue = pac.ColorToNames({r = color[1] * 255, g = color[2] * 255, b = color[3] * 255}) return hue .. " light"