Skip to content

Prevent ACE guns from hitting their own contraptions#302

Open
Ally-for-Hire wants to merge 3 commits into
ACE-Project-Team:devfrom
Ally-for-Hire:agent/ace-self-fire-prevention
Open

Prevent ACE guns from hitting their own contraptions#302
Ally-for-Hire wants to merge 3 commits into
ACE-Project-Team:devfrom
Ally-for-Hire:agent/ace-self-fire-prevention

Conversation

@Ally-for-Hire

@Ally-for-Hire Ally-for-Hire commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Idea

Look into how ACF-3 does their self-filtering, port that as it applies, and remove legacy fixes that would manually offset the bullets. We can use AI to find the specifics as they pertain to ACE, and then we can create an implementation plan for it to execute.

Description

ACE projectile filters previously excluded only the firing gun, so moving-shot traceback could re-enter the firing vehicle and damage its own armor. This ports ACF-3's contraption-wide projectile filtering approach and corrects ACE's projectile-origin handling. We are diverging slightly from theirs by implementing a 3 tick grace window, then back to normal function, so bullet's can still hit your vehicle after they've left it.

Summary

  • Maintain a live bullet filter for every CFW contraption, including entity add/remove lifecycle updates.
  • Pass the current contraption filter into each gun shot without adding a second per-shot copy.
  • Preserve that filter for flechettes and AP/HE/HEAT cluster bomblets.
  • Avoid duplicating the firing gun when the shared bullet creation path finalizes the filter.
  • Keep conventional projectiles at the physical muzzle; retain parent velocity in flight instead of shifting the spawn position.
  • Include 3-tick grace period for this filter to be active, then disable it after.

@Ally-for-Hire
Ally-for-Hire marked this pull request as draft July 23, 2026 01:46
@Ally-for-Hire Ally-for-Hire added type: bug area: core Lifecycle, contraptions, legality, points, caches, or shared systems. area: weapons Guns, racks, weapon behavior, and weapon content. and removed type: bug area: core Lifecycle, contraptions, legality, points, caches, or shared systems. area: weapons Guns, racks, weapon behavior, and weapon content. labels Jul 23, 2026
@Ally-for-Hire Ally-for-Hire self-assigned this Jul 23, 2026
@Ally-for-Hire
Ally-for-Hire marked this pull request as ready for review July 24, 2026 01:48
@Ally-for-Hire

Ally-for-Hire commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator Author

works ingame, i approve for merge, will wait a few days

@Ally-for-Hire Ally-for-Hire left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

code looks good

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

Labels

area: weapons Guns, racks, weapon behavior, and weapon content.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant