diff --git a/changelog.md b/changelog.md index a919128..99deae6 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,7 @@ +# v1.2.1 + +- add extra checks for whether you are in-game + # v1.2.0 - fix behavior with spider orbs diff --git a/mod.json b/mod.json index 6070338..54b7760 100644 --- a/mod.json +++ b/mod.json @@ -1,7 +1,7 @@ { "geode": "2.0.0-beta.23", "gd": {"android": "2.205", "win": "2.204"}, - "version": "v1.2.0", + "version": "v1.2.1", "id": "nytelyte.wave_trail_drag_fix", "name": "Wave Trail Drag Fix", "developer": "NyteLyte", diff --git a/src/main.cpp b/src/main.cpp index 366c409..78015d8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -43,7 +43,7 @@ class $modify(WTDFPlayerObject, PlayerObject) { void postCollision(float p0) { PlayerObject::postCollision(p0); - if (LevelEditorLayer::get()) return; + if (LevelEditorLayer::get() || !m_gameLayer) return; if (!m_isDart || m_isHidden) { m_fields->previousPos = m_fields->currentPos; return; @@ -199,6 +199,7 @@ class $modify(PlayLayer) { class $modify(GJBaseGameLayer) { void teleportPlayer(TeleportPortalObject *portal, PlayerObject *player) { GJBaseGameLayer::teleportPlayer(portal, player); + if (!player->m_isDart) return; CCPoint targetPos = getPortalTargetPos(portal, getPortalTarget(portal), player); static_cast(player)->m_fields->previousPos = targetPos; static_cast(player)->m_fields->justTeleported = true;