1
0
mirror of https://github.com/metrostroi-repo/MetrostroiAddon.git synced 2026-05-02 00:42:29 +00:00

Added ConVar DisableSeatShadows

This commit is contained in:
Hellss
2022-07-13 19:25:05 +03:00
parent f28a9760f3
commit 43a741526b
13 changed files with 30 additions and 1 deletions

View File

@@ -310,6 +310,7 @@ local C_Shadows3 = GetConVar("metrostroi_shadows3")
local C_Shadows4 = GetConVar("metrostroi_shadows4")
local C_AA = GetConVar("mat_antialias")
local C_Sprites = GetConVar("metrostroi_sprites")
local C_DisableSeatShadows = GetConVar("metrostroi_disableseatshadows")
local whitelist = {
["CHudChat"] = true,
["CHudDeathNotice"] = true,
@@ -1049,6 +1050,18 @@ function ENT:Think()
end
end
end
local disableSeatShadows = C_DisableSeatShadows:GetBool()
if self.DisableSeatShadows ~= disableSeatShadows then
for i=1,self:GetNW2Int("seats",0) do
local seat = self:GetNW2Entity("seat_"..i)
if IsValid(seat) then
seat:SetRenderMode(disableSeatShadows and RENDERMODE_NONE or RENDERMODE_TRANSALPHA)
if disableSeatShadows then seat:AddEffects(EF_NODRAW) else seat:RemoveEffects(EF_NODRAW) end
end
end
self.DisableSeatShadows = disableSeatShadows
end
if (GetConVar("metrostroi_disablecamaccel"):GetInt() == 0) then
self.HeadAcceleration = (self:Animate("accel",((self:GetNW2Float("Accel",0)+1)/2),0,1, 4, 1)*30-15)

View File

@@ -1192,7 +1192,9 @@ function ENT:CreateSeatEntity(seat_info)
end
-- Set some shared information about the seat
self:SetNW2Entity("seat_"..seat_info.type,seat)
local seats = self:GetNW2Int("seats",0)+1
self:SetNW2Entity("seat_"..seats, seat)
self:SetNW2Int("seats", seats)
seat:SetNW2String("SeatType", seat_info.type)
seat:SetNW2Entity("TrainEntity", self)
seat_info.entity = seat

View File

@@ -30,6 +30,7 @@ local function ClientPanel(panel)
panel:CheckBox(Metrostroi.GetPhrase("Panel.DisableCamAccel"),"metrostroi_disablecamaccel")
panel:CheckBox(Metrostroi.GetPhrase("Panel.DisableHoverText"),"metrostroi_disablehovertext")
panel:CheckBox(Metrostroi.GetPhrase("Panel.DisableHoverTextP"),"metrostroi_disablehovertextpos")
panel:CheckBox(Metrostroi.GetPhrase("Panel.DisableSeatShadows"), "metrostroi_disableseatshadows")
panel:CheckBox(Metrostroi.GetPhrase("Panel.ScreenshotMode"),"metrostroi_screenshotmode")
panel:CheckBox(Metrostroi.GetPhrase("Panel.ShadowsHeadlight"),"metrostroi_shadows1")
panel:CheckBox(Metrostroi.GetPhrase("Panel.RedLights"),"metrostroi_shadows3")

View File

@@ -102,6 +102,7 @@ CreateClientConVar("metrostroi_debugger_data_timeout",2,true,false)
CreateClientConVar("metrostroi_disablehud",0,true)
CreateClientConVar("metrostroi_renderdistance",1024,true)
CreateClientConVar("metrostroi_screenshotmode",0,true)
CreateClientConVar("metrostroi_disableseatshadows",0,true)
CreateClientConVar("metrostroi_softdrawmultipier",100,true)
CreateClientConVar("metrostroi_route_number",61,true,true)

View File

@@ -32,6 +32,7 @@ Panel.DisableHUD = Vypnout HUD v pozici strojvedoucího
Panel.DisableCamAccel = Vypnout akceleraci pohledu
Panel.DisableHoverText = Vypnout vysvětlivky
Panel.DisableHoverTextP = Disable additional information\nin tooltips #NEW
Panel.DisableSeatShadows= Disable seat shadows #NEW
Panel.ScreenshotMode = Mód snímku obrazovky (NÍZKÉ FPS)
Panel.RedLights = Zapnout dynamická červená světla
Panel.ShadowsHeadlight = Zapnout odrazy reflektorů

View File

@@ -32,6 +32,7 @@ Panel.DisableHUD = HUD im Zug deaktivieren
Panel.DisableCamAccel = Deaktivieren der Kamerabewegung
Panel.DisableHoverText = Hilfetext ausblenden
Panel.DisableHoverTextP = Disable additional information\nin tooltips #NEW
Panel.DisableSeatShadows= Disable seat shadows #NEW
Panel.ScreenshotMode = Screenshot modus (NIEDRIGE FPS)
Panel.ShadowsHeadlight = Schatten der Scheinwerfer aktivieren
Panel.RedLights = Enable dynamic light\nof red lights

View File

@@ -40,6 +40,7 @@ Panel.DisableHUD = Disable HUD in the driver seat
Panel.DisableCamAccel = Disable camera acceleration
Panel.DisableHoverText = Disable tooltips
Panel.DisableHoverTextP = Disable additional information\nin tooltips #NEW #FIXME
Panel.DisableSeatShadows= Disable seat shadows #NEW #FIXME
Panel.ScreenshotMode = Screenshot mode (LOW FPS)
Panel.ShadowsHeadlight = Enable headlight shadows
Panel.RedLights = Enable dynamic light\nof red lights

View File

@@ -32,6 +32,7 @@ Panel.DisableHUD = Désactive le HUD sur le siège du conducteur
Panel.DisableCamAccel = Désactive l'accéleration de caméra
Panel.DisableHoverText = Désactive le texte de légende
Panel.DisableHoverTextP = Disable additional information\nin tooltips #NEW
Panel.DisableSeatShadows= Disable seat shadows #NEW
Panel.ScreenshotMode = Mode screenshot (IPS bas)
Panel.ShadowsHeadlight = Active les ombres des phares
Panel.RedLights = Activer la lumière dynamique\ndes feux rouges

View File

@@ -31,6 +31,8 @@ Panel.DrawCams = Kamerák renderelése
Panel.DisableHUD = HUD kikapcsolása a vezető ülésben
Panel.DisableCamAccel = Kamera gyorsítás kikapcsolása
Panel.DisableHoverText = Felvillanó szövegek kikapcsolása
Panel.DisableHoverTextP = Disable additional information\nin tooltips #NEW
Panel.DisableSeatShadows= Disable seat shadows #NEW
Panel.ScreenshotMode = Képernyőmentés mód (ALACSONY FPS)
Panel.ShadowsHeadlight = Fényszóró árnyékok bekapcsolása
Panel.RedLights = \nZárjelző lámpák dinamikus fényének bekapcsolása

View File

@@ -30,6 +30,8 @@ Panel.DrawCams = Render telecamera
Panel.DisableHUD = Disabilita l'HUD nella sedia del macchinista
Panel.DisableCamAccel = Disabilita accellerazione della visuale
Panel.DisableHoverText = Disable hover text
Panel.DisableHoverTextP = Disable additional information\nin tooltips #NEW
Panel.DisableSeatShadows= Disable seat shadows #NEW
Panel.ScreenshotMode = Modalità screenshot (FPS Bassi)
Panel.ShadowsHeadlight = Abilita ombre faro
Panel.RedLights = Abilita le luci dinamiche\ndelle luci rosse

View File

@@ -31,6 +31,8 @@ Panel.DrawCams = 카메라 렌더링
Panel.DisableHUD = 운전석 착석시 HUD 비활성
Panel.DisableCamAccel = 시점 흔들림 사용 안함
Panel.DisableHoverText = 주석 텍스트 표시 안함
Panel.DisableHoverTextP = Disable additional information\nin tooltips #NEW
Panel.DisableSeatShadows= Disable seat shadows #NEW
Panel.ScreenshotMode = 스크린샷 모드 (낮은 FPS)
Panel.ShadowsHeadlight = 전조등 그림자 활성
Panel.RedLights = 적색등의 다이나믹 라이트 사용

View File

@@ -32,6 +32,7 @@ Panel.DisableHUD = Wyłącz HUD na miejscu maszynisty
Panel.DisableCamAccel = Wyłącz ruch kamery (wrażenie przyspieszenia)
Panel.DisableHoverText = Wyłącz podpowiedzi przycisków
Panel.DisableHoverTextP = Disable additional information\nin tooltips #NEW #FIXME
Panel.DisableSeatShadows= Disable seat shadows #NEW #FIXME
Panel.ScreenshotMode = Tryb fotografii (NISKI FPS!)
Panel.ShadowsHeadlight = Włącz dynamiczne cienie (lampy)
Panel.RedLights = Enable dynamic light\nof red lights

View File

@@ -40,6 +40,7 @@ Panel.DisableHUD = Откл. HUD в кресле машиниста
Panel.DisableCamAccel = Откл. симуляцию качания головы
Panel.DisableHoverText = Откл. всплывающий текст
Panel.DisableHoverTextP = Откл. дополнительную информацию\nв всплывающем тексте
Panel.DisableSeatShadows= Откл. тени от кресел
Panel.ScreenshotMode = Режим съёмки (НИЗКИЙ ФПС)
Panel.ShadowsHeadlight = Вкл. тени от фар
Panel.RedLights = Вкл. динамический свет от\nкрасных фар