Skip to content

Pass owner ball to audio emitters - #134

Open
phevosccp wants to merge 8 commits into
mainfrom
occlusion-parent-ball
Open

phevosccp wants to merge 8 commits into
mainfrom
occlusion-parent-ball

Conversation

@phevosccp

@phevosccp phevosccp commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Summary

Emitters on a deployable or wall were occluded by that object's own collision, because destiny's sightline query didn't know which ball an emitter belongs to.

EveSpaceObject2 and EveEffectRoot2 now pass m_ballPosition to their audio emitters through ITr2AudParentBall: directly to their observers, and through EveChildUpdateParams::ballPosition to EveChildContainer observers and EveChildAudio. Destiny skips that ball's geometry for the emitter. It is set every frame, like SetVisibility, and audio ignores unchanged values.

Depends on carbonengine/trinityaudioapi#11.

Testing

  • Built stub, dx11 and dx12 (Internal).
  • Test in a Frontier client

Space objects and effect roots pass their ball (translation curve) to their
observers and, through EveChildUpdateParams, to child containers and
EveChildAudio. Audio forwards it to destiny's sightline query, which skips
that ball's own collision geometry, so deployables and walls no longer
occlude their own emitters.
@phevosccp phevosccp changed the title Tell audio emitters which ball they are mounted on Pass owner ball to audio emitters via ITr2AudParentBall Oct 27, 2026
@phevosccp phevosccp changed the title Pass owner ball to audio emitters via ITr2AudParentBall Pass owner ball to audio emitters Oct 27, 2026
Comment thread trinity/TriObserverLocal.cpp Resolved
Comment thread trinity/TriObserverLocal.h Resolved
Comment thread trinity/Eve/EveEffectRoot2.cpp Resolved

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cpp-linter Review

Used clang-format v21.1.8

Click here for the full clang-format patch
diff --git a/trinity/TriObserverLocal.h b/trinity/TriObserverLocal.h
--- a/trinity/TriObserverLocal.h
+++ b/trinity/TriObserverLocal.h
@@ -27 +27 @@ public:
-	void SetParentBall( IRoot* ball );
+	void SetParentBall( IRoot * ball );

✨ Powered by cpp-linter -- ⭐ Star • ❤️ Sponsor • 💬 Feedback

Comment thread trinity/TriObserverLocal.h Resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Comment thread trinity/TriObserverLocal.cpp Outdated
{
if( m_observer.p != m_parentBallObserver.p )
{
m_parentBallObserver = m_observer;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Minor, but still. This creates a leaked emitter if the observer changes after this object is removed from the scene.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Good catch, fixed in ae803cc. The cache no longer holds a reference to the observer: changing observer (SetObserver, or from Python via OnModified) marks it stale and the next SetParentBall redoes the cast.

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.

3 participants