diff --git a/crates/benilla-app/src/chat_bubble.rs b/crates/benilla-app/src/chat_bubble.rs index 5838f928e..a66ead169 100644 --- a/crates/benilla-app/src/chat_bubble.rs +++ b/crates/benilla-app/src/chat_bubble.rs @@ -9,7 +9,8 @@ //! 20 yd (3-D). Self is not excluded. A new line replaces the old bubble, never queues. //! - Lifetime and fade (`0x4b0c30`): a 250 ms fade in, the line's [`duration_ms`], a 250 ms fade //! out, then the frame goes back to the pool. Out of range, or with the speaker not drawn in the -//! last render ([`speaker_drawn`]), it fades out and hides, and fades back in on return. +//! last render ([`crate::entities::SceneDrawn`]), it fades out and hides, and fades back in on +//! return. //! - Anchor (`0x4b0c30`): unit z + height × model scale + 0.7, the text's BOTTOM on the projected //! point (`0x4b157a`), growing upward. The height is the Stand sequence box's Z extent from the //! model header (`0x711a20`), not the posed attachment the overhead name reads (`0x608640`), @@ -312,22 +313,6 @@ struct Bubble { depth: Option, } -/// Whether the speaker was drawn in the last render: the reference's scene-node test `0x6704c0` -/// (`node && [node+0x94] == 0`, read at `0x4b0cab`). Every frame sets `[node+0x94]` on every node -/// in the scene list `[0xca7d70]` (`0x698a07`) and clears it only for a node that passes the -/// frustum test `0x682ef0` and the horizon test `0x686000` (`0x6833dd`-`0x6833ec`, and -/// `0x68359b`-`0x6835aa` in WMO groups). Here it is any of the unit's meshes passing last frame's -/// visibility check; benilla has no horizon cull yet, so that is the frustum verdict alone. -fn speaker_drawn( - unit: Entity, - children: &Query<&Children>, - meshes: &Query<&ViewVisibility, With>, -) -> bool { - children - .get(unit) - .is_ok_and(|kids| kids.iter().any(|c| meshes.get(c).is_ok_and(|v| v.get()))) -} - /// The live bubbles by speaker guid, at most one per unit, their stacking, and the next line's /// number. #[derive(Resource, Default)] @@ -419,8 +404,8 @@ fn drive_bubbles( time: Res