1
0
mirror of https://github.com/metrostroi-repo/MetrostroiAddon.git synced 2026-05-04 00:52:33 +00:00
* 81-722, 81-723, 81-724.
Перенос освещения с сервера на клиент. Добавление спрайтов на лампочки и кнопочки пульта. Перенос спрайтов.

* 81-720, 81-721.
Перенос освещения и спрайтов с сервера на клиент.
Добавил спрайты на лампочки и светодиоды
This commit is contained in:
Ivan Gordeev
2021-05-26 01:08:36 +03:00
committed by GitHub
parent 3c11233c40
commit 158dab1c6d
10 changed files with 246 additions and 253 deletions

View File

@@ -444,8 +444,10 @@ for i=1,8 do
}
end
ENT.Lights = {
-- Headlight glow
--[2] = { "dynamiclight", Vector( 300, 0, 40), Angle(0,0,0), Color(255,255,255), brightness = 4, distance = 550 },
-- Interior
[15] = { "dynamiclight", Vector(-330, 0, 10), Angle(0,0,0), Color(238,238,197), brightness = 0.5, distance = 500, fov=180,farz = 128 },
[16] = { "dynamiclight", Vector(-0, 0, 10), Angle(0,0,0), Color(238,238,197), brightness = 0.5, distance = 500, fov=180,farz = 128 },
[17] = { "dynamiclight", Vector( 330, 0, 10), Angle(0,0,0), Color(238,238,197), brightness = 0.5, distance = 500, fov=180,farz = 128 },
}
function ENT:Initialize()
@@ -521,6 +523,11 @@ function ENT:Think()
self.PassSchemesDone=false
self.InvertSchemes = self:GetNW2Bool("PassSchemesInvert",false)
end
local passlight = self:GetPackedRatio("SalonLighting")
self:SetLightPower(15,passlight > 0, passlight)
self:SetLightPower(16,passlight > 0, passlight)
self:SetLightPower(17,passlight > 0, passlight)
if self.LastGVValue ~= self:GetPackedBool("GV") then
self.ResetTime = CurTime()+1.5