Skip to content

Commit 1ed89ae

Browse files
committed
Compute build number from build date
1 parent 87a5502 commit 1ed89ae

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

‎Source.Common/SteamAppInfo.cs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ public static ref readonly SteamAppInfo GetSteamInfIDVersionInfo() {
1515
return ref info;
1616
}
1717

18+
#if !GMOD_DLL
1819
public static int build_number() => GetSteamInfIDVersionInfo().ServerVersion;
20+
#endif
1921
}
2022

2123
public struct SteamAppInfo

‎Source.Engine/SourceDLLMain.cs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ public static class SourceDllMain
7171
[Dependency] public static ICvar cvar { get; private set; } = null!;
7272
[Dependency] public static Cmd cmd { get; private set; } = null!;
7373
[Dependency] public static Log g_Log { get; private set; } = null!;
74+
#if GMOD_DLL
75+
public static int build_number() => (int)Sys.BuildNumber();
76+
#endif
7477
[Dependency] public static IMaterialSystemHardwareConfig HardwareConfig { get; private set; } = null!;
7578
[Dependency] public static ICommandLine commandLine { get; private set; } = null!;
7679
[KeyedDependency(Key = Realm.Server)] public static NetworkStringTableContainer networkStringTableContainerServer { get; private set; } = null!;

0 commit comments

Comments
 (0)