Closed ghost closed 4 months ago
tested, seems to work fine. i'm working on other fixes right now
-- HACK: https://github.com/looterz/atmos/issues/12
function ENT:GetNetworkVars()
local tbl = {
TopColor = self.TopColor,
BottomColor = self.BottomColor,
DuskColor = self.DuskColor,
DuskIntensity = self.DuskIntensity,
DuskScale = self.DuskScale,
FadeBias = self.FadeBias,
HDRScale = self.HDRScale,
SunNormal = self.SunNormal,
SunColor = self.SunColor,
SunSize = self.SunSize
}
-- (might) reduce __index calls a bit
if self.DrawStars then
tbl.DrawStars = self.DrawStars
tbl.StarLayers = self.StarLayers
tbl.StarScale = self.StarScale
tbl.StarFade = self.StarFade
tbl.StarSpeed = self.StarSpeed
tbl.StarTexture = self.StarTexture
end
return tbl
end
my eternal apologies but my dumb ass forgot to use self.Values
so here's the real fix
-- HACK: https://github.com/looterz/atmos/issues/12
function ENT:GetNetworkVars()
local tbl = {
TopColor = self.Values.TopColor,
BottomColor = self.Values.BottomColor,
DuskColor = self.Values.DuskColor,
DuskIntensity = self.Values.DuskIntensity,
DuskScale = self.Values.DuskScale,
FadeBias = self.Values.FadeBias,
HDRScale = self.Values.HDRScale,
SunNormal = self.Values.SunNormal,
SunColor = self.Values.SunColor,
SunSize = self.Values.SunSize
}
-- (might) reduce __index calls a bit
if self.Values.DrawStars then
tbl.DrawStars = self.Values.DrawStars
tbl.StarLayers = self.Values.StarLayers
tbl.StarScale = self.Values.StarScale
tbl.StarFade = self.Values.StarFade
tbl.StarSpeed = self.Values.StarSpeed
tbl.StarTexture = self.Values.StarTexture
end
return tbl
end
Thanks! Updated the sky ent with your changes.
Commit that caused this issue: https://github.com/Facepunch/garrysmod/pull/2068
A possible workaround could be defining our own GetNetworkVars method in https://github.com/looterz/atmos/blob/master/lua/entities/atmos_sky.lua.