Repository navigation
Fix drivable APC not accounting for ducking correctly when scaling damage - #367
Merged
1upD merged 1 commit intoNov 9, 2026
Merged
Conversation
Blixibon
force-pushed
the
ez2/feature/apc-duck-damage-fix
branch
from
October 7, 2026 18:08
aa1b859 to
bb19173
Compare
1upD
approved these changes
Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes the drivable APC not scaling damage when the player is ducking in the vehicle.
The original Human Error implementation used arbitrary values that summed up to the damage scale being reduced by half of the original 15%. The E:Z implementation was meant to get around this when it moved to using cvars, although this was not implemented correctly. It did not actually account for how much the view was lowered and, in practice, only added a flat constant value to the scale. This presumably went unnoticed due to the extremely small damage scales the APC uses by default.
This PR fixes that by remapping
m_flViewLoweredto a dedicated damage scale cvar, assigning that value to the view hide damage scale value, and then multiplying that with the original scale instead of adding to it.