From 79fca45c130a360c34a4149390aeb81d299092c6 Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Sun, 1 Aug 2021 13:03:19 +0300 Subject: [PATCH] Expose hidden server option. --- module/Core/Script.cpp | 2 +- module/Misc/Constants.cpp | 8 ++++---- module/VCMP/vcmp20.h | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/module/Core/Script.cpp b/module/Core/Script.cpp index 08b69d0e..78c4608c 100644 --- a/module/Core/Script.cpp +++ b/module/Core/Script.cpp @@ -99,7 +99,7 @@ void ScriptSrc::Process() // Read completely? if (r != static_cast< size_t >(length)) { - return SqThrowF(fmt::runtime("Failed to read script contents.")); // Not cool + SqThrowF(fmt::runtime("Failed to read script contents.")); // Not cool } // Where the last line ended size_t line_start = 0, line_end = 0; diff --git a/module/Misc/Constants.cpp b/module/Misc/Constants.cpp index 18b83c4e..94670def 100644 --- a/module/Misc/Constants.cpp +++ b/module/Misc/Constants.cpp @@ -344,12 +344,12 @@ static const EnumElement g_ServerOptionEnum[] = { {_SC("WallGlitch"), vcmpServerOptionWallGlitch}, {_SC("DisableBackfaceCulling"), vcmpServerOptionDisableBackfaceCulling}, {_SC("DisableHeliBladeDamage"), vcmpServerOptionDisableHeliBladeDamage}, -#if SQMOD_SDK_LEAST(2, 1) +//#if SQMOD_SDK_LEAST(2, 1) {_SC("DisableCrouch"), vcmpServerOptionDisableCrouch}, {_SC("Max"), vcmpServerOptionDisableCrouch} -#else - {_SC("Max"), vcmpServerOptionDisableHeliBladeDamage} -#endif +//#else +// {_SC("Max"), vcmpServerOptionDisableHeliBladeDamage} +//#endif }; // ------------------------------------------------------------------------------------------------ diff --git a/module/VCMP/vcmp20.h b/module/VCMP/vcmp20.h index 8a9e99df..efb266c0 100644 --- a/module/VCMP/vcmp20.h +++ b/module/VCMP/vcmp20.h @@ -156,6 +156,7 @@ typedef enum { vcmpServerOptionWallGlitch = 19, vcmpServerOptionDisableBackfaceCulling = 20, vcmpServerOptionDisableHeliBladeDamage = 21, + vcmpServerOptionDisableCrouch = 22, // Apparently this exists in 4.6 as well forceSizeVcmpServerOption = INT32_MAX } vcmpServerOption;