From 73482c3d2706419e41253c2ba5c245099daa9476 Mon Sep 17 00:00:00 2001 From: RD42 <42702181+dashr9230@users.noreply.github.com> Date: Mon, 14 Oct 2024 18:09:46 +0800 Subject: [PATCH] [saco] Implement/match `CTrain_ProcessControl_Derailment()` --- saco/game/hooks.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/saco/game/hooks.cpp b/saco/game/hooks.cpp index 722b165..ba8399b 100644 --- a/saco/game/hooks.cpp +++ b/saco/game/hooks.cpp @@ -428,7 +428,13 @@ NUDE CCameraCamShake_Sniper_Hook() NUDE CTrain_ProcessControl_Derailment() { - // TODO: CTrain_ProcessControl_Derailment + _asm { + mov eax, [esi+1444]; // get the speed + and eax, 0x80000000; // get the upper bit + or eax, 0x3F800000; // or it with 1.0f (it'll be -ve if bit is set) + mov [esi+1444], eax; // set the new speed + ret; + } } //-----------------------------------------------------------