-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Sonic Frontiers] Swing Reels Only Swing Once
- Loading branch information
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
Source/Sonic Frontiers/Gameplay/Cyber Space/Objects/Swing Reels Only Swing Once.hmm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
Patch "Swing Reels Only Swing Once" in "Gameplay/Cyber Space/Objects" by "Hyper" does "This changes all swing reels to require only one swing for the player to launch off of it, rather than two." | ||
// | ||
static float _swingTime = 47.5f; | ||
static float _swingVelocityMul = 1.35f; | ||
// | ||
{ | ||
fixed (float* p_swingTime = &_swingTime) | ||
{ | ||
WriteAsmHook | ||
( | ||
$@" | ||
mov rcx, {(long)p_swingTime} | ||
movss xmm2, dword ptr [rcx] | ||
movss dword ptr [rbx + 0x27C], xmm0 | ||
comiss xmm0, xmm2 | ||
mov rbp, qword ptr [rsp + 0x50] | ||
", | ||
|
||
/* 0x140522449 */ | ||
ScanSignature | ||
( | ||
"\xF3\x0F\x11\x83\x7C\x02\x00\x00\x0F\x2F\x45\x64", | ||
"xxxxxxxxxxxx" | ||
), | ||
|
||
HookBehavior.Replace | ||
); | ||
} | ||
|
||
fixed (float* p_swingVelocityMul = &_swingVelocityMul) | ||
{ | ||
WriteAsmHook | ||
( | ||
$@" | ||
mov r9, {(long)p_swingVelocityMul} | ||
movss xmm0, dword ptr [r9] | ||
mulss xmm6, xmm0 | ||
lea r9, qword ptr [rsp + 0x58] | ||
mov dword ptr [rsp + 0x80], 0 | ||
", | ||
|
||
/* 0x1405211EA */ | ||
ScanSignature | ||
( | ||
"\x4C\x8D\x4C\x24\x58\xC7\x84\x24\x80\x00\x00\x00\x00\x00\x00\x00", | ||
"xxxxxxxxxxxxxxxx" | ||
), | ||
|
||
HookBehavior.Replace | ||
); | ||
} | ||
} |