From 472167228261b63ff7a22f90f2fed9ffa72d392b Mon Sep 17 00:00:00 2001 From: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com> Date: Sun, 3 Nov 2024 17:20:11 +0300 Subject: [PATCH] Implement fix for flame thrower zero initialization bug. --- UnleashedRecomp/game.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/UnleashedRecomp/game.cpp b/UnleashedRecomp/game.cpp index a969e38..848676e 100644 --- a/UnleashedRecomp/game.cpp +++ b/UnleashedRecomp/game.cpp @@ -292,3 +292,18 @@ PPC_FUNC(sub_82BD06C8) } #pragma endregion + +#pragma region Object Bug Fixes + +// CObjFlame::CObjFlame +// A field is not zero initialized, +// causing collisions to constantly get created +// and slow down the game. +PPC_FUNC_IMPL(__imp__sub_82608E60); +PPC_FUNC(sub_82608E60) +{ + memset(base + ctx.r3.u32, 0, 0x154); + __imp__sub_82608E60(ctx, base); +} + +#pragma endregion