Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[changed] wall climb state is reset if descending past slide speed or when bouncing on a trampoline #2259

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mugg91
Copy link
Contributor

@mugg91 mugg91 commented Dec 20, 2024

Status

  • READY: this PR is (to the best of your knowledge) ready to be incorporated into the game.

Description

Fixes #2254
Fixes #2118

This PR resets your character's wall climb state when descending down beyond the slide-speed threshold, reducing annoying situations where the game prevents you from wall climbing if you have descended but not touched the ground yet, and then have made your way back up via grapple or trampoline.

This was done by splitting up the if-else codeblocks in RunnerMovement.as into:

	if (!blob.isOnCeiling() && !isknocked && !blob.isOnLadder()) 
	{
		const f32 slidespeed = 2.45f;
		bool key_pressed = (up || left || right || down);

		if (key_pressed)
		{

		( . . . )

		}
		else if (vel.y > slidespeed)
		{
			moveVars.wallrun_count = 0;
			moveVars.walljumped_side = Walljump::NONE;
		}
	}

Since this alone didn't fix the last situation in the video in issue #2118 , I changed TrampolineLogic.as to reset the player's wallclimb state when bounced.

Tested in offline, works as intended. Tested situations are:

  • Archer descending but not touching the ground, then grappling up on the same wall again.
  • Player wallclimbing and walljumping, then falling down and bouncing up by trampoline, then wallclimbing the same wall again.
  • Knight walljumping off a left wall, then bouncing up, then trying to wall climb another left wall before touching the ground.

After this PR, you are allowed to wall climb again in these situations.

@azephiris
Copy link

Imo wall climbing (and other abilities) should use stamina.
In this case, that would mean using a timer to gain another jump every X.
Resetting the jump counter on particular situations seems risky and not future-proof.

@mugg91
Copy link
Contributor Author

mugg91 commented Dec 21, 2024

I chose the condition for the state reset to be vel.y > slidespeed (slidespeed equals 2.45f)
For speeds less than or equal to slide speed, nothing changes.
For speeds higher than slide speed, your wall climbing state is reset. But you will not be able to wall climb on the same wall again immediately because you are descending past the slide speed.
If you attempt to wallclimb, there are checks vel.y < slidespeed so logically there isn't a way to abuse the state reset - it only benefits you if you make your way back up through a legitimate method, via trampoline, grapple or bomb jump.

Please let me know what exactly is risky about this approach or how it could possibly be exploited.
And what should be the alternative way to fix the issues?

@asumagic asumagic added change A change to an existing feature or mechanic discussion An controversial/debatable issue requiring discussion by the community before implementation labels Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change A change to an existing feature or mechanic discussion An controversial/debatable issue requiring discussion by the community before implementation
Projects
None yet
3 participants