diff options
author | Treeki <treeki@gmail.com> | 2012-03-23 04:21:35 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-03-23 04:21:35 +0100 |
commit | 393be37f168ba7bca4d471993aaf0899a4afc16b (patch) | |
tree | 410d3fdebc599d3e43eb6e3f6038fb6d099581eb /src/bossPlayerClown.cpp | |
parent | 6739d68df74fabb94f1525f5f6ae8ff3dfe0d907 (diff) | |
download | kamek-393be37f168ba7bca4d471993aaf0899a4afc16b.tar.gz kamek-393be37f168ba7bca4d471993aaf0899a4afc16b.zip |
a really hacky fix for the clown crash
Diffstat (limited to '')
-rw-r--r-- | src/bossPlayerClown.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bossPlayerClown.cpp b/src/bossPlayerClown.cpp index eb67db3..522314e 100644 --- a/src/bossPlayerClown.cpp +++ b/src/bossPlayerClown.cpp @@ -126,7 +126,15 @@ extern "C" void __dt__Q23m3d5mdl_cFv(m3d::mdl_c *mdl, u32 willDelete); extern "C" void __dt__16mHeapAllocator_cFv(mHeapAllocator_c *al, u32 willDelete); extern "C" void __dt__20daJrClownForPlayer_cFv(dEn_c *clown, u32 willDelete); +extern "C" u32 sAllocatorFunc__FrmHeap; + void newClownDtor(dEn_c *clown, u32 willDelete) { + void **al = (void **)(((u32)clown) + 0x524); + if (*al != &sAllocatorFunc__FrmHeap) { + OSReport("oh no! bad allocator %p\n", *al); + *al = &sAllocatorFunc__FrmHeap; + } + __dt__Q23m3d5mdl_cFv(cModel, 0xFFFFFFFF); __dt__16mHeapAllocator_cFv(cAllocator, 0xFFFFFFFF); __dt__20daJrClownForPlayer_cFv(clown, willDelete); |