-
Notifications
You must be signed in to change notification settings - Fork 589
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Skylanders] Fix infinite fall softlock at high FPS (#639)
Thanks to @SuperSamus (and Winner Nombre)!
- Loading branch information
1 parent
c713d33
commit 546f593
Showing
4 changed files
with
75 additions
and
3 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
src/SkylandersSuperChargers/Mods/FPS/patch_FixInfiniteFall.asm
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,51 @@ | ||
[SSC_FixInfiniteFall] | ||
moduleMatches = 0xccf357b3, 0x1407432e, 0x3a1208f7, 0x21fc6048, 0x3e598867, 0xcf77bcd5, 0x25a11655 | ||
.origin = codecave | ||
|
||
const_stuckFallingDistanceThreshold: | ||
.float 20*30/$targetFPS | ||
|
||
_getStuckFallingDistanceThreshold_f13: | ||
lis r0, const_stuckFallingDistanceThreshold@ha | ||
lfs f13, const_stuckFallingDistanceThreshold@l(r0) | ||
blr | ||
|
||
_getStuckFallingDistanceThreshold_f0: | ||
lis r0, const_stuckFallingDistanceThreshold@ha | ||
lfs f0, const_stuckFallingDistanceThreshold@l(r0) | ||
blr | ||
|
||
[SSC_FixInfiniteFall_V1] | ||
moduleMatches = 0xccf357b3 ; v1 | ||
|
||
0x0220e028 = bla _getStuckFallingDistanceThreshold_f0 | ||
|
||
[SSC_FixInfiniteFall_V16] | ||
moduleMatches = 0x1407432e ; 1.1.0 | ||
|
||
0x0220c35c = bla _getStuckFallingDistanceThreshold_f13 | ||
|
||
[SSC_FixInfiniteFall_V32] | ||
moduleMatches = 0x3a1208f7 ; 1.2.0 | ||
|
||
0x0220d958 = bla _getStuckFallingDistanceThreshold_f13 | ||
|
||
[SSC_FixInfiniteFall_V48] | ||
moduleMatches = 0x21fc6048 ; 1.3.0 | ||
|
||
0x0220f940 = bla _getStuckFallingDistanceThreshold_f13 | ||
|
||
[SSC_FixInfiniteFall_V64] | ||
moduleMatches = 0x3e598867 ; 1.4.0 | ||
|
||
0x02210e78 = bla _getStuckFallingDistanceThreshold_f13 | ||
|
||
[SSC_FixInfiniteFall_V80] | ||
moduleMatches = 0xcf77bcd5 ; 1.5.0 | ||
|
||
0x02212da8 = bla _getStuckFallingDistanceThreshold_f13 | ||
|
||
[SSC_FixInfiniteFall_V96_V97] | ||
moduleMatches = 0x25a11655 ; 1.6.1 (v96 in US, v97 in EU) | ||
|
||
0x02212da8 = bla _getStuckFallingDistanceThreshold_f13 |
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
21 changes: 21 additions & 0 deletions
21
src/SkylandersSwapForce/Mods/FPS/patch_FixInfiniteFall.asm
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,21 @@ | ||
[SSF_FixInfiniteFall] | ||
moduleMatches = 0xa0b35374, 0xb1f102ec ; v16, v0 | ||
.origin = codecave | ||
|
||
const_stuckFallingDistanceThreshold: | ||
.float 20*30/$targetFPS | ||
|
||
_getStuckFallingDistanceThreshold: | ||
lis r0, const_stuckFallingDistanceThreshold@ha | ||
lfs f0, const_stuckFallingDistanceThreshold@l(r0) | ||
blr | ||
|
||
[SSF_FixInfiniteFall_V16] | ||
moduleMatches = 0xa0b35374 ; v16 | ||
|
||
0x0242729c = bla _getStuckFallingDistanceThreshold | ||
|
||
[SSF_FixInfiniteFall_V0] | ||
moduleMatches = 0xb1f102ec ; v0 | ||
|
||
0x02427214 = bla _getStuckFallingDistanceThreshold |
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