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

Feature Request: Shift (hold key) to run/sprint #172

Open
iwanPlays opened this issue Apr 1, 2023 · 0 comments
Open

Feature Request: Shift (hold key) to run/sprint #172

iwanPlays opened this issue Apr 1, 2023 · 0 comments

Comments

@iwanPlays
Copy link

iwanPlays commented Apr 1, 2023

What
Add option to press shift to run in addition to W-tap.

Why
Receiver 2 has it, https://steamcommunity.com/app/1129310/discussions/search/?q=shift+run&gidforum=2865909887923510527&include_deleted=1

For me personally the worst part about it is not being able to fine-jump onto ledges, as tapping w makes me leap over into death.

Turning on shift/hold-sprint should at the same time disable tap-sprint.

Alternatives
I've been hacking the game with dnspy for my need but I'd be nice to have for accessibility.
Others use AHK scripts or something.

How

R1 ui suggestion:
settings
Ideally "toggleable sprint" would be disabled if "holdable sprint" is disabled but even R2 doesn't have that, so...

bindings

R2 ui:
r2 settings

Code findings

From discord:

- Find if(old_vert_axis < 0.9f && character_input.GetAxis("Vertical") >= 0.9f){
- Replace with if(Input.GetKey(KeyCode.LeftShift) || old_vert_axis < 0.9f && character_input.GetAxis("Vertical") >= 0.9f){

but then

if((Input.GetKey(KeyCode.LeftShift) && character_input.GetAxis("Vertical") >= 0.9f) || (old_vert_axis < 0.9f && character_input.GetAxis("Vertical") >= 0.9f)){
Would do that instead

and also

if (true)
{
    if (!this.crouching && Input.GetKey(KeyCode.LeftShift) && !base.GetComponent<AimScript>().IsAiming())
    {
        this.SetRunning(Mathf.Clamp(2f, 0.01f, 1f));
        this.bool_running = true;
    }
    this.forward_input_delay = 0f;
}
this.forward_input_delay += Time.deltaTime;
if (!Input.GetKey(KeyCode.LeftShift) || base.GetComponent<AimScript>().IsAiming())
{
    this.SetRunning(0f);
    this.bool_running = false;
}

code annotations
code annotations2

I was told that MovementInputs.cs gets auto-updated after modifying MovementInputs.inputactions, so there would be no need to manually edit it.

Would be cool if someone was up to the task but worst case I'll come back with more free time in a year and try to make a commit based on these notes :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant