Skip to content

Fix drivable APC not accounting for ducking correctly when scaling damage - #367

Merged
1upD merged 1 commit into
entropy-zero:ez2/mapbasefrom
Blixibon:ez2/feature/apc-duck-damage-fix
Nov 9, 2026
Merged

1upD merged 1 commit into
entropy-zero:ez2/mapbasefrom
Blixibon:ez2/feature/apc-duck-damage-fix

Conversation

@Blixibon

@Blixibon Blixibon commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

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_flViewLowered to 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.

@Blixibon
Blixibon force-pushed the ez2/feature/apc-duck-damage-fix branch from aa1b859 to bb19173 Compare October 7, 2026 18:08
@1upD
1upD merged commit 2a00bb4 into entropy-zero:ez2/mapbase Nov 9, 2026
8 of 9 checks passed
@Blixibon
Blixibon deleted the ez2/feature/apc-duck-damage-fix branch November 9, 2026 06:14
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.

2 participants