@@ -41,24 +41,14 @@ PPC_FUNC(sub_8221A7D8)
4141 __imp__sub_8221A7D8 (ctx, base);
4242}
4343
44- // Sonicteam::Player::State::*Context IDynamicLink::Init
45- PPC_FUNC_IMPL (__imp__sub_8220F330);
46- PPC_FUNC (sub_8220F330)
44+ // Sonicteam::Player::State::*Context IDynamicLink::Init, Removed
45+ // SonicTeam::Player::Score::ctor
46+ PPC_FUNC_IMPL (__imp__sub_821E8C48);
47+ PPC_FUNC (sub_821E8C48)
4748{
48- if (!Config::TailsGauge)
49+ auto pPlayer = (Sonicteam::Player::Object*)(base + ctx.r4 .u32 );
50+ if (pPlayer->m_PlayerLua == " player/tails.lua" )
4951 {
50- __imp__sub_8220F330 (ctx, base);
51- return ;
52- }
53-
54- auto pDynamicLink = (Sonicteam::Player::IDynamicLink*)(base + ctx.r3 .u32 );
55- auto spPlugin = (boost::shared_ptr<Sonicteam::Player::IPlugIn>*)(base + ctx.r4 .u32 );
56-
57- // If this call is from TailsContext and this plugin is Sonicteam::Player::Score, set up the action gauge.
58- // This is typically set up by OpenGauge in Lua, but we can't do this here.
59- if (pDynamicLink->m_pVftable .ptr == 0x8200B7F4 && spPlugin->get ()->m_Name == " score" )
60- {
61- auto pScore = (Sonicteam::Player::Score*)spPlugin->get ();
6252 auto pSonicGauge = GuestToHostFunction<Sonicteam::Player::SonicGauge*>(sub_8223F208, g_userHeap.Alloc (sizeof (Sonicteam::Player::SonicGauge)));
6353
6454 guest_stack_var<boost::shared_ptr<Sonicteam::Player::IGauge>> spSonicGauge;
@@ -67,12 +57,11 @@ PPC_FUNC(sub_8220F330)
6757 GuestToHostFunction<void >(sub_821BEAB0, spSonicGauge.get (), pSonicGauge);
6858
6959 // Add gauge plugin to player.
70- GuestToHostFunction<void >(sub_821BECE0, pScore-> m_pPlayer . get () , spSonicGauge.get (), 1 );
60+ GuestToHostFunction<void >(sub_821BECE0, pPlayer , spSonicGauge.get (), 1 );
7161
72- pScore-> m_pPlayer ->m_spGauge = *spSonicGauge.get ();
62+ pPlayer ->m_spGauge = *spSonicGauge.get ();
7363 }
74-
75- __imp__sub_8220F330 (ctx, base);
64+ __imp__sub_821E8C48 (ctx, base);
7665}
7766
7867bool MidairMachSpeedControl1 ()
0 commit comments