From c1ae08879e95927e75b049449d874931f4408875 Mon Sep 17 00:00:00 2001 From: Nova_ Date: Thu, 7 Sep 2023 16:31:41 +0200 Subject: [PATCH 1/2] tweak(scripting-mono-v2): bump pilot date --- .../citizen-scripting-mono-v2/src/MonoScriptRuntime.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/components/citizen-scripting-mono-v2/src/MonoScriptRuntime.cpp b/code/components/citizen-scripting-mono-v2/src/MonoScriptRuntime.cpp index e8453a2257..3967c90b17 100644 --- a/code/components/citizen-scripting-mono-v2/src/MonoScriptRuntime.cpp +++ b/code/components/citizen-scripting-mono-v2/src/MonoScriptRuntime.cpp @@ -263,11 +263,12 @@ int MonoScriptRuntime::HandlesFile(char* filename, IScriptHostWithResourceData* } // last supported date for this pilot of mono_rt2, in UTC - constexpr int maxYear = 2023, maxMonth = 8, maxDay = 31; + constexpr int maxYear = 2023, maxMonth = 12, maxDay = 31; // Allowed values for mono_rt2 constexpr std::string_view allowedValues[] = { // put latest on top, right here ↓ + "Prerelease expiring 2023-12-31. See https://aka.cfx.re/mono-rt2-preview for info."sv, "Prerelease expiring 2023-08-31. See https://aka.cfx.re/mono-rt2-preview for info."sv, "Prerelease expiring 2023-06-30. See https://aka.cfx.re/mono-rt2-preview for info."sv, }; From 4699c873fe24f8cc778290bc367519392afd28cf Mon Sep 17 00:00:00 2001 From: LWSS Date: Tue, 19 Sep 2023 11:57:16 -0700 Subject: [PATCH 2/2] tweak(client): get pureLevel numerically --- code/client/shared/PureModeState.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/code/client/shared/PureModeState.h b/code/client/shared/PureModeState.h index 36b81b6ae1..b525ccdf0e 100644 --- a/code/client/shared/PureModeState.h +++ b/code/client/shared/PureModeState.h @@ -20,13 +20,10 @@ inline int GetPureLevel() std::wstring_view cli = (sharedData->initCommandLine[0]) ? sharedData->initCommandLine : GetCommandLineW(); pureLevel = 0; - if (cli.find(L"pure_1") != std::string_view::npos) + size_t found = cli.find(L"-pure_"); + if (found != std::wstring_view::npos) { - pureLevel = 1; - } - else if (cli.find(L"pure_2") != std::string_view::npos) - { - pureLevel = 2; + pureLevel = _wtoi(&cli[found + 6]); } return pureLevel;