mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-04-28 21:37:58 +03:00
Fix Werehog rotating into walls when leaving them at HFR
This commit is contained in:
parent
e4c43ae3b1
commit
82fc288b3c
2 changed files with 20 additions and 0 deletions
|
@ -195,3 +195,11 @@ bool SparkleLocusMidAsmHook()
|
||||||
// This has the side effect of the locus particle eventually snapping to the rest position during pause, but it's better than vertices exploding.
|
// This has the side effect of the locus particle eventually snapping to the rest position during pause, but it's better than vertices exploding.
|
||||||
return App::s_deltaTime < (1.0 / 60.0);
|
return App::s_deltaTime < (1.0 / 60.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CEvilSonicContext_CStateWall_LeaveRotationMidAsmHook(PPCRegister& f1)
|
||||||
|
{
|
||||||
|
// The code in the Werehog's "wall" state for leaving walls adds a constant
|
||||||
|
// value of 0.05 to his transform every frame. This makes the value respect
|
||||||
|
// delta time whilst maintaining the original behaviour at 30 FPS.
|
||||||
|
f1.f64 = f1.f64 * (std::min(App::s_deltaTime, 1.0 / 15.0) / (1.0 / 30.0));
|
||||||
|
}
|
||||||
|
|
|
@ -1141,3 +1141,15 @@ registers = ["r3"]
|
||||||
name = "EndingTextPositionMidAsmHook"
|
name = "EndingTextPositionMidAsmHook"
|
||||||
address = 0x82580168
|
address = 0x82580168
|
||||||
registers = ["r31", "f13"]
|
registers = ["r31", "f13"]
|
||||||
|
|
||||||
|
# Wall Leave - Left
|
||||||
|
[[midasm_hook]]
|
||||||
|
name = "CEvilSonicContext_CStateWall_LeaveRotationMidAsmHook"
|
||||||
|
address = 0x824067BC
|
||||||
|
registers = ["f1"]
|
||||||
|
|
||||||
|
# Wall Leave - Right
|
||||||
|
[[midasm_hook]]
|
||||||
|
name = "CEvilSonicContext_CStateWall_LeaveRotationMidAsmHook"
|
||||||
|
address = 0x82406774
|
||||||
|
registers = ["f1"]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue