Intro
Usually, when an NPC, actor, or Player’s buddies does an action where they would cut Infected’s Head off, they leave behind a severed head.
If a Player decided to throw an object, let’s say a brick or bottle. The game would crash. Why’s that?
Affected Consoles:
-
PlayStation 3Unofficially Patched -
PlayStation 4Unofficially Patched -
PlayStation 5 Video
-
PS4/PS5 versions issue still persists on latest patch 1.11
Finding what caused the crash
When the game crashed, using an emulator we can see that it gives an access violation as well as the address it stopped.
Going to this location in Ghidra gives us some clues.
The game does checks if:
-
Object is throwable
-
Object collided with is enemy
We can check using a Debugger with a breakpoint set on the crash address.
Hit on the Head.
Hit on an Enemy.
In Register 10 and 29, there’s some data here. It seems to be collision data.
Our best guess is that the game thinks the object collied is an enemy and no data generated.
Solution
We can add some data into Register 10 and additional check to prevent crashing.
- [ be32, 0x006d9368, 0x483aa7ed ] #Branch
- [ be32, 0x00a83b54, 0x3d400001 ] #lis r10 = 0x10000
- [ be32, 0x00a83b58, 0x7f9d5000 ] #cmp r29 vs r10
- [ be32, 0x00a83b5c, 0x409d0008 ] #Skip if r29<=r10 // If r29 less or equal to r10 then do nothing
- [ be32, 0x00a83b60, 0x813d0040 ] #lwz r9,0x40(r29) // load as normal
- [ be32, 0x00a83b64, 0x4e800020 ] #Return
Let’s implement this fix and see the results!
Success! No longer crashes when throwing an object.
Patch
For those looking to use the patch on the emulator, you can head over to the patch manager, click on the “Download Latest Patches” and find the patch you wanted to use with your game Title ID and version, click on the checkbox to enable the patch and save changes.
Credits
Thank you to ZEROx for improving over my inital patch.
And Aphelion for allowing me to use his footage in the post.