234
This commit is contained in:
1 parent
e1459c9834
commit
b48d1f68f6
14 files changed
+51196
-45855
No files matched your search
@@ -1164,6 +1164,12 @@ end
|
||||
|
||||
---------------------------------------------------------------- телепорт
|
||||
|
||||
local TELEPORT_FADE = 0.3 -- сколько клиент затемняет экран перед переносом
|
||||
local teleporting = {}
|
||||
Players.PlayerRemoving:Connect(function(p)
|
||||
teleporting[p] = nil
|
||||
end)
|
||||
|
||||
local function teleportTo(player, worldId)
|
||||
local data = profiles[player]
|
||||
local char = player.Character
|
||||
@@ -1190,9 +1196,17 @@ local function teleportTo(player, worldId)
|
||||
end
|
||||
local map = workspace:FindFirstChild("FishingMap")
|
||||
local m = map and map:FindFirstChild(markerName, true) -- маркеры могут лежать в папках уровня (World1Map)
|
||||
if m then
|
||||
if m and not teleporting[player] then
|
||||
-- клиент затемняет экран, переносим уже в темноте: свет новой локации ставится до того, как её видно
|
||||
teleporting[player] = true
|
||||
stopFishing(player, true)
|
||||
char:PivotTo(m.CFrame + Vector3.new(0, 3, 0))
|
||||
remote:FireClient(player, "TeleportFade", worldId, TELEPORT_FADE)
|
||||
task.wait(TELEPORT_FADE)
|
||||
teleporting[player] = nil
|
||||
char = player.Character
|
||||
if char and char.Parent then
|
||||
char:PivotTo(m.CFrame + Vector3.new(0, 3, 0))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -61,20 +61,29 @@ local function ensure(class, parent, props)
|
||||
return obj
|
||||
end
|
||||
|
||||
-- Базовый свет при запуске игры (совпадает со светом лобби). Под каждую локацию его меняет клиент
|
||||
-- по полям look из FishConfig, пока игрок за экраном загрузки.
|
||||
function Builder.applyLighting()
|
||||
Lighting.ClockTime = 14.5
|
||||
Lighting.Brightness = 2.3
|
||||
Lighting.Ambient = Color3.fromRGB(70, 70, 85)
|
||||
Lighting.OutdoorAmbient = Color3.fromRGB(140, 145, 160)
|
||||
Lighting.EnvironmentDiffuseScale = 0.6
|
||||
Lighting.EnvironmentSpecularScale = 0.8
|
||||
Lighting.ClockTime = 16.3
|
||||
Lighting.Brightness = 2.0
|
||||
Lighting.ExposureCompensation = -0.3
|
||||
Lighting.Ambient = Color3.fromRGB(64, 60, 72)
|
||||
Lighting.OutdoorAmbient = Color3.fromRGB(120, 114, 124)
|
||||
Lighting.ColorShift_Top = Color3.fromRGB(255, 224, 186)
|
||||
Lighting.EnvironmentDiffuseScale = 0.5
|
||||
Lighting.EnvironmentSpecularScale = 0.5
|
||||
Lighting.GlobalShadows = true
|
||||
ensure("Atmosphere", Lighting, {
|
||||
Density = 0.25, Offset = 0.12, Glare = 0, Haze = 0.6,
|
||||
Color = Color3.fromRGB(200, 215, 232), Decay = Color3.fromRGB(110, 140, 175),
|
||||
Density = 0.4, Offset = 0.18, Glare = 0.25, Haze = 1.6,
|
||||
Color = Color3.fromRGB(222, 212, 204), Decay = Color3.fromRGB(186, 160, 150),
|
||||
})
|
||||
ensure("BloomEffect", Lighting, { Intensity = 0.5, Size = 24, Threshold = 1.4 })
|
||||
ensure("ColorCorrectionEffect", Lighting, { Saturation = 0.15, Contrast = 0.06, Brightness = 0.02 })
|
||||
ensure("SunRaysEffect", Lighting, { Intensity = 0.05, Spread = 0.8 })
|
||||
ensure("BloomEffect", Lighting, { Intensity = 0.3, Size = 24, Threshold = 1.8 })
|
||||
ensure("ColorCorrectionEffect", Lighting, {
|
||||
Saturation = 0.18, Contrast = 0.14, Brightness = -0.04, TintColor = Color3.fromRGB(255, 242, 228),
|
||||
})
|
||||
ensure("SunRaysEffect", Lighting, { Intensity = 0.05, Spread = 0.7 })
|
||||
-- размытие дальнего плана включают миры и лобби через look.dof
|
||||
ensure("DepthOfFieldEffect", Lighting, { Enabled = false, FarIntensity = 0.18, FocusDistance = 55, InFocusRadius = 95, NearIntensity = 0 })
|
||||
end
|
||||
|
||||
---------------------------------------------------------------- помощники
|
||||
|
||||
Reference in new issue
Block a user