Skip to content

Commit

Permalink
extra checks
Browse files Browse the repository at this point in the history
  • Loading branch information
nytelytee committed Apr 9, 2024
1 parent d1bc4e6 commit 9fd6723
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v1.2.1

- add extra checks for whether you are in-game

# v1.2.0

- fix behavior with spider orbs
Expand Down
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
3 changes: 2 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<WTDFPlayerObject *>(player)->m_fields->previousPos = targetPos;
static_cast<WTDFPlayerObject *>(player)->m_fields->justTeleported = true;
Expand Down

0 comments on commit 9fd6723

Please sign in to comment.