diff --git a/ChaosMod/Effects/Effect.h b/ChaosMod/Effects/Effect.h index eb89da347..bf70c9394 100644 --- a/ChaosMod/Effects/Effect.h +++ b/ChaosMod/Effects/Effect.h @@ -6,6 +6,8 @@ #include "Effects/EffectTimedType.h" #include "Effects/EffectsInfo.h" +#include "Util/File.h" + #include #include @@ -140,6 +142,16 @@ class RegisterEffect public: RegisterEffect(void (*onStart)(), void (*onStop)(), void (*onTick)(), EffectInfo &&effectInfo) { + static bool disableEffectRegistration = []() + { + return DoesFileExist("chaosmod\\.disablebuiltineffects"); + }(); + + if (disableEffectRegistration) + { + return; + } + m_RegisteredEffect = { effectInfo.Id, onStart, onStop, onTick }; g_RegisteredEffects.push_back(m_RegisteredEffect);