Skip to content

Commit

Permalink
fix teleport portal regression
Browse files Browse the repository at this point in the history
  • Loading branch information
nytelytee committed Mar 23, 2024
1 parent 0f55390 commit 44921e0
Show file tree
Hide file tree
Showing 3 changed files with 11 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.1.7

- fix teleport portal regression

# v1.1.6

- fix the trail showing up in the editor when the player reverses direction
Expand Down
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"android": "2.205",
"win": "2.204"
},
"version": "v1.1.6",
"version": "v1.1.7",
"id": "nytelyte.wave_trail_drag_fix",
"name": "Wave Trail Drag Fix",
"developer": "NyteLyte",
Expand Down
7 changes: 6 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ class $modify(PlayerObject) {
// over another (the an unchanged direction being detected as a change in direction over a long period of time)
m_fields->prev_position = current_position;
}
else if (m_fields->dont_add) m_fields->dont_add = false;
else if (m_fields->dont_add) {
m_fields->dont_add = false;
// also update the position if we overrode the addition of a point
// (in the case of teleport portals)
m_fields->prev_position = current_position;
}
}

// teleport portal
Expand Down

0 comments on commit 44921e0

Please sign in to comment.