Skip to content

Commit

Permalink
bandaid fix upward slopes
Browse files Browse the repository at this point in the history
  • Loading branch information
theyareonit committed Jul 10, 2024
1 parent 1f9e220 commit 3761dff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 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.20

* bandaid fix for upward slopes cuz whatever

# v1.1.19

* Fix delayed inputs on blocks moving downward
Expand Down
2 changes: 1 addition & 1 deletion mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"gd": {
"win": "2.206"
},
"version": "v1.1.19",
"version": "v1.1.20",
"id": "syzzi.click_between_frames",
"name": "Click Between Frames",
"developer": "syzzi",
Expand Down
6 changes: 0 additions & 6 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,6 @@ class $modify(CCDirector) {
}
};

float p1CollisionDelta;
float p2CollisionDelta;
bool actualDelta;

class $modify(GJBaseGameLayer) {
Expand Down Expand Up @@ -457,10 +455,8 @@ class $modify(PlayerObject) {
if (p1NotBuffering) {
PlayerObject::update(newTimeFactor);
if (!step.endStep) {
p1CollisionDelta = newTimeFactor;
if (firstLoop) this->m_isOnGround = p1StartedOnGround; // this fixes delayed inputs on platforms moving down for some reason
if (!this->m_isOnSlope) pl->checkCollisions(this, 0.0f, true);
else pl->checkCollisions(this, 0.01f, true); // troll
PlayerObject::updateRotation(newTimeFactor);
newResetCollisionLog(this);
}
Expand All @@ -473,10 +469,8 @@ class $modify(PlayerObject) {
if (p2NotBuffering) {
p2->update(newTimeFactor);
if (!step.endStep) {
p2CollisionDelta = newTimeFactor;
if (firstLoop) p2->m_isOnGround = p2StartedOnGround;
if (!p2->m_isOnSlope) pl->checkCollisions(p2, 0.0f, true);
else pl->checkCollisions(p2, 0.01f, true);
p2->updateRotation(newTimeFactor);
newResetCollisionLog(p2);
}
Expand Down

0 comments on commit 3761dff

Please sign in to comment.