diff --git a/changelog.md b/changelog.md index 26b59d2..c4efa84 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,7 @@ # 1.5.8 - Fixed not being able to use checkpoints in platformer with all modes platformer enabled +- Fixed crash when playtesting with **Force Ghost On** enabled - Coins are now collected if you complete a level with 1 attempt practice complete # 1.5.7 diff --git a/src/Hacks/ForceGhost.cpp b/src/Hacks/ForceGhost.cpp index 6832c53..3a67356 100644 --- a/src/Hacks/ForceGhost.cpp +++ b/src/Hacks/ForceGhost.cpp @@ -8,11 +8,14 @@ class $modify (PlayerObject) { void toggleGhostEffect(GhostType p0) { - if (Client::GetModuleEnabled("ghost-on")) - p0 = GhostType::Enabled; + if (PlayLayer::get()) + { + if (Client::GetModuleEnabled("ghost-on")) + p0 = GhostType::Enabled; - if (Client::GetModuleEnabled("ghost-off")) - p0 = GhostType::Disabled; + if (Client::GetModuleEnabled("ghost-off")) + p0 = GhostType::Disabled; + } PlayerObject::toggleGhostEffect(p0); }