Skip to content

Fix the logic bug causing close range aimed at head misses - #4733

Open
SaltyKarl wants to merge 1 commit into
CombatExtended-Continued:Developmentfrom
SaltyKarl:Closerange_aimingheadmissfix
Open

SaltyKarl wants to merge 1 commit into
CombatExtended-Continued:Developmentfrom
SaltyKarl:Closerange_aimingheadmissfix

Conversation

@SaltyKarl

@SaltyKarl SaltyKarl commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Additions

none

Changes

CheckCellForCollision and ImpactSomething if (Map.GetLightingTracker().HighestCoverAt(cell) < ExactPosition.y) to if (Map.GetLightingTracker().HighestCoverAt(pos) > Mathf.Min(LastPos.y, ExactPosition.y)) so it checks all pos in a tick instead of only pos in tick end

References

https://discord.com/channels/278818534069501953/668604879526428713/1545745273173708891

Reasoning

does not apply logic bug

Alternatives

different way to rewrite the logic

Testing

Check tests you have performed:

  • Compiles without warnings
  • Game runs without errors
  • (For compatibility patches) ...with and without patched mod loaded
  • Playtested a colony (specify how long)

@SaltyKarl
SaltyKarl requested review from a team as code owners September 13, 2026 18:31
@SaltyKarl SaltyKarl changed the title Update ProjectileCE.cs Fix the logic bug causing close range aimed at head misses Sep 13, 2026
@github-actions

Copy link
Copy Markdown

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-34774885327.zip

@github-actions github-actions Bot added the Download in Comments This PR has a zipfile download available. label Sep 13, 2026

@N7Huntsman N7Huntsman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fixes the issue for me.

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

Labels

Download in Comments This PR has a zipfile download available.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants