Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Game.Server/World.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

using Source.Common;
using Source.Common.Commands;
using Source.Common.Mathematics;
using Source.Engine;

using System.Numerics;
Expand Down Expand Up @@ -103,6 +104,27 @@ public override void Precache() {
g_iszFuncBrushClassname = "func_brush";
}

public override bool KeyValue(ReadOnlySpan<char> keyName, ReadOnlySpan<char> 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<char> GetDefaultLightstyleString(int styleIndex) => styleIndex < g_DefaultLightstyles.Length ? g_DefaultLightstyles[styleIndex] : "m";
static readonly string[] g_DefaultLightstyles = [
// 0 normal
Expand Down
Loading