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).
This commit is contained in:
ragnarok-clanker 2026-10-30 22:03:45 +00:00
commit 04edb6b31b

View file

@ -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<CGameSettingsMgr>::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;
}
}