Skip to content

Conversation

@AdamTadeusz
Copy link
Contributor

@AdamTadeusz AdamTadeusz commented Nov 23, 2025

Description

solves the same problem as #1493 but keeps separate keybinds for hold and toggle lean. Also allows a hold bind to lift a toggle bind for the same behavior and adds that to the lean and walk binds

Toolchain

  • Windows MSVC VS2022
  • Linux GCC Distro Native [Specify distro + GCC version]
  • Linux GCC 10 Sniper 3.0

Linked Issues

@sunzenshen sunzenshen requested review from a team and sunzenshen November 24, 2025 04:28
sunzenshen
sunzenshen previously approved these changes Nov 24, 2025
Copy link
Contributor

@sunzenshen sunzenshen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For what it's worth, this works for how I usually use lean, but interested to see what someone with more experience with the movement mechanics would think.

VantoNortim
VantoNortim previously approved these changes Nov 26, 2025
Copy link
Contributor

@VantoNortim VantoNortim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working as intended. However some sides notes, if you can't actually jump/run it will untoggle your lean. On the other hand falling does not even though it unleans you.

if (IsSprinting() || IsAirborne()) { IN_LeanToggleReset(); return; }

Could have these reset in c_neo_player but this is fine as well.

@Rainyan Rainyan self-requested a review November 26, 2025 16:00
Rainyan

This comment was marked as resolved.

@Rainyan

This comment was marked as outdated.

@Rainyan Rainyan requested review from Rainyan and removed request for Rainyan November 26, 2025 16:09
@Rainyan Rainyan dismissed their stale review November 26, 2025 16:10

out of scope

@AdamTadeusz AdamTadeusz dismissed stale reviews from VantoNortim and sunzenshen via 687c776 November 28, 2025 10:59
@AdamTadeusz
Copy link
Contributor Author

I guess toggling off relevant toggles when pressing the sprint or jump key where the action wasn't actually performed (because of freeze time or because unable to sprint) could feel weird. The original doesn't have toggle lean, but aim doesn't reset when the sprint button is pressed, only if the player successfully started sprinting, so following this behavior I also made the lean only reset when the player jumps or sprints. This does introduce the discrepancy that supports now cannot un-lean by pressing the sprint button, but they can still stop walking by pressing the sprint button. Should I leave this as is? I think its kinda cool that you can toggle off walking just by pressing sprint, regardless of whether you can actually sprint or not, since we don't have a walking indicator

@AdamTadeusz AdamTadeusz requested a review from Rainyan December 1, 2025 13:16
Rainyan
Rainyan previously approved these changes Dec 2, 2025
sunzenshen
sunzenshen previously approved these changes Dec 2, 2025
@AdamTadeusz AdamTadeusz dismissed stale reviews from sunzenshen and Rainyan via 7f0ea91 December 2, 2025 10:02
@AdamTadeusz AdamTadeusz merged commit ebe8229 into NeotokyoRebuild:master Dec 4, 2025
7 checks passed
@AdamTadeusz AdamTadeusz deleted the 291_leanToggleResetOnSprintAndJumpPlusHoldPriorityOverToggleExceptWhenTogglingTwice branch December 4, 2025 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lean Toggle should turn off when sprinting/jumping just like OGNT

4 participants