From 308ca91d9e3554dd7db0425d490e3dc210b10f7f Mon Sep 17 00:00:00 2001 From: Sam Sung <51686767+samwhosung@users.noreply.github.com> Date: Sat, 24 Oct 2026 21:51:12 +0700 Subject: [PATCH] Pick, plates and minimap follow what the scene drew, as 1.12.1 (#2355) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit What the scene drew and what the camera looks at now decide plates, the mouse pick and the minimap, as in 1.12.1. - **Mouse pick:** static doodads occlude it with their drawn opaque meshes, not their hulls (`0x69cdb0`, mode 2 of `0x7089c0`). - **Plates:** a plate needs its unit drawn last frame (`0x6704c0`). Under far sight, plates centre on the camera's object, and there are none when it isn't a unit (`0x60f77c`). - **Far sight:** `SMSG_CLEAR_FAR_SIGHT_IMMEDIATE` ends it (`0x5e43f8` โ†’ `0x5ee590`). - **Minimap:** - the interior window keeps its z until x/y leave it or the group changes (`0x6d952c`); - party and pet dots and the group rim arrows have tooltips (`0x4eb33c`, `0x4eb42d`). - **Tutorials:** Equippable Items skips ammo and quivers (`0x809200`). Each fix has a test that failed before it. Fixes #756 Fixes #2341 Fixes #2342 Fixes #2343 Fixes #2344 Fixes #2345 Fixes #2347 ๐Ÿค– Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 5.5 --- crates/benilla-app/src/chat_bubble.rs | 27 +-- crates/benilla-app/src/entities.rs | 4 + .../benilla-app/src/entities/scene_drawn.rs | 28 +++ crates/benilla-app/src/minimap/blips/dots.rs | 133 ++++++++-- crates/benilla-app/src/minimap/blips/mod.rs | 43 ++-- crates/benilla-app/src/minimap/interior.rs | 138 +++++++++-- crates/benilla-app/src/minimap/mod.rs | 43 +++- crates/benilla-app/src/player.rs | 4 + crates/benilla-app/src/player/view_subject.rs | 101 +++++++- crates/benilla-app/src/target/hover.rs | 144 +++++++++-- crates/benilla-app/src/target/mod.rs | 7 +- crates/benilla-app/src/tutorial.rs | 59 ++++- crates/benilla-app/src/vplates.rs | 51 ++-- crates/benilla-app/src/vplates/gate_tests.rs | 97 ++++++++ crates/benilla-app/tests/world_api_wall.rs | 1 + crates/benilla-protocol/src/events.rs | 3 + crates/benilla-protocol/src/events/decode.rs | 1 + .../benilla-protocol/src/messages/opcode.rs | 3 + .../benilla-protocol/src/messages/packet.rs | 3 + crates/benilla-protocol/src/messages/parse.rs | 14 ++ crates/benilla-world/src/collision.rs | 10 +- crates/benilla-world/src/interact/mod.rs | 93 ++++++- crates/benilla-world/src/interact/pick.rs | 25 ++ crates/benilla-world/src/static_gx/cull.rs | 3 + crates/benilla-world/src/static_gx/mod.rs | 44 +++- crates/benilla-world/src/static_gx/pick.rs | 227 ++++++++++++------ .../src/terrain_stream/spawn/assemble.rs | 10 + .../src/terrain_stream/spawn/mod.rs | 27 +-- .../benilla-world/src/terrain_stream/weld.rs | 15 +- docs/DEVIATIONS.md | 28 +-- 30 files changed, 1141 insertions(+), 245 deletions(-) create mode 100644 crates/benilla-app/src/entities/scene_drawn.rs 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