Skip to content

hud_strafehelper.c bugfixes, refactors, cleanup#289

Merged
taysta merged 2 commits intomasterfrom
movement-keys
Feb 11, 2026
Merged

hud_strafehelper.c bugfixes, refactors, cleanup#289
taysta merged 2 commits intomasterfrom
movement-keys

Conversation

@taysta
Copy link
Owner

@taysta taysta commented Feb 11, 2026

cleanup:

  • Add const qualifiers to function parameters and local variables where applicable
  • Remove redundant parentheses
  • Reduce variable scope and move declarations closer to usage
  • Replace unnecessary temporaries and redundant else blocks
  • Use sqrtf, acosf, asinf, floorf consistently for float math
  • Minor formatting and readability improvements
  • Remove unused variables and dead code

correctness:

  • Initialize conditional variables in DF_StrafeHelper
  • Remove duplicate airaccelerate assignment in DF_SetPhysics
  • Early return on division by zero in DF_GetCmdScale
  • Initialize scale in DF_GetWishspeed to avoid uninitialized use

fix:

  • Fix keys sticking in movement keys overlay when in spec/demo playback

@taysta taysta changed the title Fux movement keys overlay in spec/demo playback Fix movement keys overlay in spec/demo playback Feb 11, 2026
cleanup:
- Add const qualifiers to function parameters and local variables where applicable
- Remove redundant parentheses
- Reduce variable scope and move declarations closer to usage
- Replace unnecessary temporaries and redundant else blocks
- Use sqrtf, acosf, asinf, floorf consistently for float math
- Minor formatting and readability improvements
- Remove unused variables and dead code

correctness:
- Initialize conditional variables in DF_StrafeHelper
- Remove duplicate airaccelerate assignment in DF_SetPhysics
- Early return on division by zero in DF_GetCmdScale
- Initialize scale in DF_GetWishspeed to avoid uninitialized use
@taysta taysta changed the title Fix movement keys overlay in spec/demo playback cgame/hud_strafehelper.c bugfixes, refactors, cleanup Feb 11, 2026
@taysta taysta changed the title cgame/hud_strafehelper.c bugfixes, refactors, cleanup hud_strafehelper.c bugfixes, refactors, cleanup Feb 11, 2026
@taysta taysta merged commit d5aa0d6 into master Feb 11, 2026
14 checks passed
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.

1 participant