From 04edb6b31b3d1448c2b025b9caaed40dbf803dbc Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 30 Oct 2026 22:03:45 +0000 Subject: [PATCH] Decompile fn_06356 (ApplyServiceOptionJitterScale) Batch #6331 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_06356 ApplyServiceOptionJitterScale: logic confirmed by peer review Peer-reviewed-by: alisonrag, superintelligence, Romain Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- .../Contents/Configuration/ServiceOptions.cpp | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Source/Contents/Configuration/ServiceOptions.cpp b/Source/Contents/Configuration/ServiceOptions.cpp index c0c25804..6ea5bcdc 100644 --- a/Source/Contents/Configuration/ServiceOptions.cpp +++ b/Source/Contents/Configuration/ServiceOptions.cpp @@ -91,6 +91,12 @@ ServiceOptions g_serviceOptions; // GLOBAL: gl_24791 LuaScript* g_luaScript; +// GLOBAL: gl_24569 +const float g_jitterDistanceScale = 400.0f; + +// GLOBAL: gl_25022 +float g_serviceOptionJitterScale = 400.0f; + void ApplyServiceOption(int id, unsigned char value, bool notify, int enabledMessage, int disabledMessage); // OFFSET: 0x006BFE60 @@ -925,3 +931,20 @@ CGameSettingsMgr* Singleton::GetInstance() { return s_instance; } + +// OFFSET: 0x006C45F0 +// FUNCTION: fn_06356 +void ApplyServiceOptionJitterScale(int id, unsigned char value, bool notify, int enabledMessage, int disabledMessage) { + if (g_serviceOptions.Get(id) != value) { + g_serviceOptions.Set(id, value); + if (notify) { + NotifyServiceOption(value, enabledMessage, disabledMessage, 0x64FFFF); + } + } + + if (value) { + g_serviceOptionJitterScale = 730.0f; + } else { + g_serviceOptionJitterScale = g_jitterDistanceScale; + } +}