Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.6 hotfix for broken projectiles #2969

Merged
merged 6 commits into from
Mar 5, 2024
Merged

5.6 hotfix for broken projectiles #2969

merged 6 commits into from
Mar 5, 2024

Conversation

perkinslr
Copy link
Contributor

@perkinslr perkinslr commented Jan 31, 2024

Reasoning

  • Projectile Height returned a cached value. Projectile next position relied on projectile height. This lead to projectile height being frozen.
  • Deprecating ProjectileCE.Height makes it clear that ProjectileCE.ExactPosition is the sole authority on CE-related projectile positioning. Also it removes a virtual lookup so will have marginally better performance.
  • By storing the next "frame" directly into ExactPosition and then pulling a local copy inside Tick, subclasses of ProjectileCE can override how ExactPosition gets updated entirely, without forcing updating ExactPosition into a virtual call in the trivial case.
  • Explicitly initializing ExactPosition and LastExactPosition during launch removes a messy and moderately expensive calculation and removes the need for a nullable, which should further help performance.
  • Projectiles should use their current rather than initial height for determining where to draw shadows

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 (minutes)

@perkinslr perkinslr requested review from a team as code owners January 31, 2024 09:15
Copy link

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

@github-actions github-actions bot added the Download in Comments This PR has a zipfile download available. label Jan 31, 2024
@perkinslr perkinslr mentioned this pull request Feb 1, 2024
4 tasks
@N7Huntsman N7Huntsman merged commit e6277e3 into Development Mar 5, 2024
2 checks passed
@N7Huntsman N7Huntsman deleted the 5.6hotfix branch March 5, 2024 00:16
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.

2 participants