mirror of
https://github.com/bfbbdecomp/bfbb.git
synced 2024-11-27 00:21:00 +00:00
Fix checkpoint_collision_hack name mangling
This commit is contained in:
parent
ef0f32823b
commit
7454f5531c
@ -202,13 +202,13 @@ void zEntSetup(zEnt* ent)
|
||||
checkpoint_collision_hack(ent);
|
||||
}
|
||||
|
||||
// Equivalent. Local static name mangling on model_id is unlike anything else seen in the project so far.
|
||||
// It is reminiscent of namespace mangling. There is also a simple instruction swap involving setting the
|
||||
// autogenerated init variable, which may be solved if this mangling thing is figured out.
|
||||
void checkpoint_collision_hack(zEnt* ent)
|
||||
// Equivalent
|
||||
// This function needs to be declared inline to generate the correct mangled name for model_id
|
||||
inline void checkpoint_collision_hack(zEnt* ent)
|
||||
{
|
||||
// instruction swap involving the guard for this static initializer.
|
||||
// Might be due to the sda reloc access for model_id getting moved down
|
||||
static U32 model_id = xStrHash("checkpoint_bind");
|
||||
|
||||
if (ent->asset->modelInfoID == model_id)
|
||||
{
|
||||
ent->bound.type = 0x2;
|
||||
|
Loading…
Reference in New Issue
Block a user