Skip to content

Conversation

@AdamTadeusz
Copy link
Contributor

@AdamTadeusz AdamTadeusz commented Nov 24, 2025

Description

Resets toggle aim when dropping or switching weapons while maintaining aimed in status when using hold to aim and the weapon switched to supports aiming in, still kinda janky when holding aim button while dropping weapons sometimes

Toolchain

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

-fixes #1514
-fixes #1516

@sunzenshen sunzenshen requested a review from a team November 25, 2025 04:23
VantoNortim
VantoNortim previously approved these changes Nov 26, 2025
@Rainyan
Copy link
Collaborator

Rainyan commented Nov 26, 2025

Could we also fix the case where switching guns while in aim-toggle does not untoggle the aim even though it should? (Unless you think that should be its own PR)

@AdamTadeusz AdamTadeusz marked this pull request as draft November 28, 2025 11:15
@AdamTadeusz AdamTadeusz changed the title Reset toggles on death Reset toggles on death and aim toggle reset when switching weapons and dropping weapons Dec 4, 2025
@AdamTadeusz
Copy link
Contributor Author

kinda janky because the server doesn't know if the client is using hold or toggle to aim in

@Agiel
Copy link
Contributor

Agiel commented Dec 7, 2025

Would it make sense to call AimToggleReset in Weapon_SetZoom to make sure we catch all cases? I can't think of any situations where you want it to zoom in again automatically.

Cases I found while testing that aren't handled(but there might be more).

  • Reload
  • Spawning in on a new round (if you didn't die).

@DESTROYGIRL DESTROYGIRL added the Release priority Pull request is a priority for the next release label Dec 22, 2025
@AdamTadeusz
Copy link
Contributor Author

AdamTadeusz commented Dec 30, 2025

spawning in on a new round if you didn't die is outside the scope of this pr now idk. Networking m_bFirstAliveTick works once and then doesn't work on subsequent rounds someone else can figure it out if they want it fixed quickly

@AdamTadeusz AdamTadeusz marked this pull request as ready for review December 30, 2025 14:29
@AdamTadeusz AdamTadeusz requested a review from a team December 30, 2025 14:29
void C_NEO_Player::Weapon_Drop(C_NEOBaseCombatWeapon *pWeapon)
{
m_bIneligibleForLoadoutPick = true;
Weapon_SetZoom(false);
Copy link
Contributor

Choose a reason for hiding this comment

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

Removal of this line makes aim stay when dropping weapons, accident? Did you mean to replace it with IN_AimToggleReset() or something?

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

Labels

Release priority Pull request is a priority for the next release

Projects

None yet

5 participants