Skip to content

Commit 9c0bb7e

Browse files
committed
a
1 parent 321b90c commit 9c0bb7e

File tree

1 file changed

+3
-24
lines changed

1 file changed

+3
-24
lines changed

src/Hacks/Speedhack.cpp

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ float speedhackLogic(float dt)
1212
if (CCScene::get() && CCScene::get()->getChildByType<LoadingLayer>(0))
1313
return dt;
1414

15+
if (!FMODAudioEngine::sharedEngine()->m_system)
16+
return dt;
17+
1518
if (!masterGroup)
1619
FMODAudioEngine::sharedEngine()->m_system->getMasterChannelGroup(&masterGroup);
1720

@@ -105,30 +108,6 @@ void myUpdate(CCScheduler* ins, float dt)
105108

106109
#endif
107110

108-
#ifdef GEODE_IS_IOS
109-
110-
FMOD_RESULT FMOD_System_createChannelGroup(FMOD::System* self, const char *name, FMOD::ChannelGroup **channelgroup) {
111-
auto res = reinterpret_cast<FMOD_RESULT(__cdecl*)(FMOD::System*, const char*, FMOD::ChannelGroup**)>(geode::base::get() + 0x4d4f1c)(self, name, channelgroup);
112-
113-
if (!masterGroup)
114-
masterGroup = *channelgroup;
115-
116-
log::info("WE HAVE A MASTER GROUP LETS FUCKING GO!!!!");
117-
118-
return res;
119-
}
120-
121-
$execute {
122-
(void)Mod::get()->hook(
123-
reinterpret_cast<void*>(geode::base::get() + OffsetManager::get()->offsetForFunction(FunctionType::FMOD__System__createChannelGroup)), // address
124-
&FMOD_System_createChannelGroup, // detour
125-
"FMOD::System::createChannelGroup", // display name, shows up on the console
126-
tulip::hook::TulipConvention::Cdecl // calling convention
127-
);
128-
}
129-
130-
#endif
131-
132111
class $modify (GJBaseGameLayer)
133112
{
134113
virtual void update(float dt)

0 commit comments

Comments
 (0)