From 97fdd5e7be5969ab0750f395ac66a9dcfab00775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Thu, 8 Oct 2026 20:38:07 +0300 Subject: [PATCH] Fix world not applying skyname and world bounds keys --- Game.Server/World.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Game.Server/World.cs b/Game.Server/World.cs index da78fbf39..89ebb19f7 100644 --- a/Game.Server/World.cs +++ b/Game.Server/World.cs @@ -4,6 +4,7 @@ using Source.Common; using Source.Common.Commands; +using Source.Common.Mathematics; using Source.Engine; using System.Numerics; @@ -103,6 +104,27 @@ public override void Precache() { g_iszFuncBrushClassname = "func_brush"; } + public override bool KeyValue(ReadOnlySpan keyName, ReadOnlySpan value) { + if (FStrEq(keyName, "skyname")) { + ConVarRef skyname = new("sv_skyname"); + skyname.SetValue(value); + } + else if (FStrEq(keyName, "world_mins")) { + Vector3 vec = default; + UTIL_StringToVector(vec.Base(), value); + WorldMins = vec; + } + else if (FStrEq(keyName, "world_maxs")) { + Vector3 vec = default; + UTIL_StringToVector(vec.Base(), value); + WorldMaxs = vec; + } + else + return base.KeyValue(keyName, value); + + return true; + } + public static ReadOnlySpan GetDefaultLightstyleString(int styleIndex) => styleIndex < g_DefaultLightstyles.Length ? g_DefaultLightstyles[styleIndex] : "m"; static readonly string[] g_DefaultLightstyles = [ // 0 normal