Fixed edge-scrolling speed in the world map

* commit a3383fd only fixed when in normal game maps.
This commit is contained in:
NovaRain
2026-01-04 12:36:23 +08:00
parent c44fe84cc4
commit 19d0f5c16a
+5 -2
View File
@@ -192,7 +192,7 @@ static __declspec(naked) void map_scroll_hook_elapsed_time() {
} }
// get_time_ engine function is only a wrapper of GetTickCount // get_time_ engine function is only a wrapper of GetTickCount
static __declspec(naked) void map_scrall_hook_get_time() { static __declspec(naked) void map_scroll_hook_get_time() {
__asm { __asm {
push ecx; push ecx;
push edx; push edx;
@@ -255,7 +255,10 @@ void SpeedPatch::init() {
SafeWrite32(0x4FDF58, (DWORD)&getLocalTimeOffs); SafeWrite32(0x4FDF58, (DWORD)&getLocalTimeOffs);
HookCall(0x4A433E, scripts_check_state_hook); HookCall(0x4A433E, scripts_check_state_hook);
HookCall(0x4826CF, map_scroll_hook_elapsed_time); HookCall(0x4826CF, map_scroll_hook_elapsed_time);
HookCall(0x4826EB, map_scrall_hook_get_time); HookCalls(map_scroll_hook_get_time, {
0x4826EB, // map_scroll_
0x4C33C0, 0x4C33CF // wmMouseBkProc_ (replace get_bk_time_)
});
TimerInit(); TimerInit();
} }