Commit Graph

1190 Commits

Author SHA1 Message Date
Berchia 019bf19ce0 Chat: a release pass no longer shifts the held lines (#3025)
- Chat: a release pass no longer shifts the held lines
- Chat: say what the held map buys, in the present

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Sam <samuv.eth@gmail.com>
2026-11-20 07:12:28 +07:00
Sam Sung 2ec32392f5 Timing tests hold on a loaded machine (#3035)
Tests that timed the scheduler failed on a loaded machine, as the gates' background priority makes it.

CVar saves come a quiet second after a change, and a slow frame spends that second. The account-file tests now assert the contract: the old file exists exactly while `config.toml` lacks the row. The quiet-second test checks for no write only when the frame took under a second.

Server-alert reads get 10 s from an answering server. The inner-tile wait tests assert `StreamActivity::wait_ms`, which every waiting frame adds to, in place of a frame's wall time.

Every test hang bound is now 120 s, including `fake::WAIT`. Tick-count loops are deadlines, the profile test's cap is microsecond-sized, and the stalled-frame test measures the wall over every frame its GetTime span covers.

Fixes #3028
Fixes #3029
Fixes #3030
Fixes #3033

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 05:33:54 +07:00
Sam Sung 84022ba98c README: point to benilla-wotlk beside the expansions not planned (#3024)
The README says other expansions are not planned. It now names benilla-wotlk, a separate 3.3.5a client built from benilla, so someone who wants Wrath of the Lich King knows where that work is.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 09:27:27 +07:00
Sam Sung 641f188a58 Step trigger: a riser leaning out over its foot is a step (#3023)
Since the stairs fix classified floors by the hit face, some steps stopped the player like a wall, such as the Thelsamar inn's door and the Dun Morogh, Loch Modan and Wetlands tunnels. The step trigger still refused a face whose normal points slightly down. That gate was harmless on the contact normal, but many dwarven risers lean a few degrees out over their foot (the inn's sill: z −0.063), so no step was tried.

1.12.1's trigger (`0x6334a0`) returns 0 for a face leaning out (`n.z < 0`, `0x63351c`) that doesn't touch the box's top (`0x6333d0`), as it does for a steep upright face. The walk resolver then runs the step probe (`0x636b6e`).

The trigger now refuses only a face facing down by more than 50°. A test walks the real inn WMO over its 0.28 yd sill; it stalls without the change. The Stormwind stair tests still pass.

Fixes #3019

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 09:00:05 +07:00
Sam Sung 2c7343581e Group list: apply a list whose loot tail ends at the threshold (#3022)
On a server that ends SMSG_GROUP_LIST's loot tail at the threshold, such as MaNGOS Zero, grouping did nothing: no party frames, and /p answered "You aren't in a group", while party chat from others still arrived. The decoder required a fourth tail byte, so a body one byte short failed with EOF and the whole list was skipped.

1.12.1's handler reads that byte at `0x5e6e3d` into a local it never uses. `CDataStore::GetUInt8` (`0x418cb0`) answers a short store by leaving the destination unwritten, without failing, so the list still applies. vmangos and cmangos-classic send the byte; MaNGOS Zero and servers built on wow_messages do not.

The byte is now read the same way: when it is missing, nothing fails. A test feeds a one-member list with no byte after the threshold, and it fails without the change.

Fixes #3016

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 08:26:53 +07:00
Berchia 49efb23359 net: a released object's take no longer walks its type's reuse list (#3021)
A burst of object destroys froze the client: `Released::take` ran `retain` over its type's whole reuse list on every call, and it runs for every `SMSG_DESTROY_OBJECT` and every block that brings a released object back, so N such packets with R released objects cost O(N·R).

1.12.1 keeps the reuse lists the release appends to (`0x464a83`, in `ClntObjMgrRelease`), unlinks the object on reactivation (`0x464635`, `0x46464c`) and frees the head on a new object of the type (`0x466e55`, `ClntObjMgrAllocObject`).

Each list entry now carries its release's stamp. A take leaves its entry stale, the free skips stale entries, and the lists compact once stale entries pass the live count by 64, so a take is amortised O(1) and the free order is unchanged. Tests cover a take from the middle, a re-release joining the tail, per-type lists and compaction.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-11-17 07:50:31 +07:00
Sam Sung e5651f0ddd nameplates: draw overhead names in the UNIT_NAME_FONT face (#3013)
Overhead unit names were laid out in Friz Quadrata whatever the install, so on a zhCN install, whose glyphs that face lacks, NPC names over heads drew nothing (#3005).

In 1.12.1 the name font is not a locale table: `PlayerNameInitialize` (`0x6c7470`) reads the Lua global `UNIT_NAME_FONT` at world entry through `FrameScript::GetVariable` (`0x704350`) and builds the name font from it (`0x5c1ae0`), so the install's own `Fonts.xml`, or an addon that reassigns the global, picks the face. `s_loadingFontPaths` (`0x82f018`) is the loading screen's tip font.

A `UnitNameFont` resource is read at the same world-entry seat as `DAMAGE_TEXT_FONT`, the name mesh lays out its baseline and glyphs in that face, and the mesh cache drops when the face changes.

Tests: `the_name_mesh_lays_out_in_the_unit_name_font`, `world_entry_reads_unit_name_font`, `a_new_name_face_drops_the_meshes_and_the_live_plates`.

Fixes #3005

Co-authored-by: hyrw <47274436+hyrw@users.noreply.github.com>

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-08 14:53:11 +07:00
Jonas Örnfelt 1b61c377f0 A world entry opens on the pick's map and ends its wait at our arrival (#3011)
On a server that sends no `SMSG_LOGIN_VERIFY_WORLD` for the character list's map (MaNGOS Zero since its `402c570`), the world-entry loading screen never cleared, and with the wait forced past our player stood on the previous map's terrain: the screen waited for that packet's snap, and `CurrentMap` was set by the worldport packets alone.

In 1.12.1 the glue's state 8 opens the world at the character record's map before the login (`0x46c236` → `0x401570`), `HandleLoginVerifyWorldPacket` (`0x401de0`) does nothing for the manager's own map (`0x468580`), and `CGPlayer_C::OnActiveArrival` ends the screen (`0x5dea50` → `0x5debbd` → `0x407e80`).

A glue entry now seats `CurrentMap` from the pick (the first half of #2824), and a world entry's wait for its snap and for our create ends once our player is there. A transfer still waits for `SMSG_NEW_WORLD`; a reconnect in the world leaves the map to the server.

Tests: `a_glue_entry_opens_the_world_on_the_picks_map`, `an_arrival_ends_a_world_entrys_wait_for_its_snap`.
2026-11-08 07:14:59 +07:00
Sam Sung 69dc0fa6f7 README: name WOW_PIN and WOW_PIN_TOTP beside the login variables (#3012)
The README's setup paragraph named `WOW_USER` and `WOW_PASS` and nothing for a PIN-protected account, so a player with 2FA on their account had no pointer to `WOW_PIN` or `WOW_PIN_TOTP`, which only `docs/CONTRIBUTING.md`, "Running it unattended", describes. The paragraph now names both variables in a sentence and points at that section.

Fixes #3007

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-08 06:26:51 +07:00
Sam Sung 5fb852dd00 release 0.3.1 (#3004)
benilla 0.3.1: the workspace version and the lock. The Rust pin stays at 1.98.1, the compiler the release checks ran on.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 09:25:32 +07:00
Sam Sung 3f77729171 loading_screen: hold a cross-map screen until our player's create (#3002)
After a cross-map loading screen, the world drew for about a round trip with no body for our player and an empty portrait. The screen cleared on readiness alone, a few frames after the ack, ahead of the create the ack brings.

In 1.12.1 the screen ends at our arrival: `CGPlayer_C::PostInit` (`0x465dbc` → `0x5debe0`) runs the arrival and `EndLoadingScreen` (`0x5debbd` → `0x407e80`).

A raise whose load brings our create (world entry, a transfer, a worldport) now also waits for that create. A ship's leg change brings none and does not wait. An abort or a logout drops the wait, and a pending cinematic's arrival still counts. The header no longer claims the old clear was the reference's.

Test: `a_cross_map_screen_waits_for_our_create` holds the screen over a resident destination until the create, then clears. Without the fix it clears early. A live login and a hop to Kalimdor both clear.

Fixes #2959

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 23:33:19 +07:00
Sam Sung 841024dc5c ui_unit: gate the debug-only epoch field so release builds stay quiet (#3001)
A release build warned that `SpanStart::epoch` is never read. Its only reader is the debug build's check that a span-start snapshot is of the entries it saw (`ui_unit/views.rs`, `fire_unit_views`), and its only writer, `mark_span_start`, is debug-only too. The field now carries the same `#[cfg(debug_assertions)]`. The play build compiles without the warning.

The second warning on the issue, in `third_party/wgpu-hal/src/gles/egl.rs`, is upstream's code as published. The fork keeps its diff to the marked hunks it needs (`third_party/wgpu-hal/BENILLA.md`), so it stays.

Fixes #2970

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 23:00:54 +07:00
Sam Sung e748780b9e editbox: draw the text by SetJustifyH (#2999)
An edit box always drew its text left-aligned: `SetJustifyH("RIGHT")` or `("CENTER")` moved only the `OnCursorChanged` x.

In 1.12.1 the box's `SetJustifyH` writes the box's own font (`0x797a17`, `+0x324`) through the shared setter `0x79fc20`, which pushes the change to the label linked to that font (`0x779c27`). `SetMultiLine` cuts off only the label's vertical bits (`0x77a509`, `0x77a599`), so the horizontal justify draws.

The box's font now exists with its label, justified `LEFT` as the constructor leaves it (`0x779bd2`). The four justify methods act on that font, the label no longer pins H, and the caret reads the label's justify. The separate justify word on the box is gone.

Test: `the_text_draws_by_the_boxs_justify_h_and_its_own_justify_v` checks the drawn H follows `SetJustifyH` while V stays the box's own. Without the fix, RIGHT draws LEFT.

Fixes #2977

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 22:09:19 +07:00
Sam Sung f9889a3c9d lua: keep ipairs' global name alive through a collection (#2998)
`ipairs(t)` answered nil once a script had cleared the global `ipairs`, a collection had run, and the global was set again.

The reference reads the global `ipairs` raw as the loop's iterator (`0x702d15`), by name. We read it by a string id interned once at start, but the collector's root list of those names was kept by hand and left `ipairs` out. A collection could free the string, and setting the global again interned it under a new id.

`Names::all` now lists every field through an exhaustive pattern, and the collector roots that list, so a name added later does not compile until it is rooted.

Test: `ipairs_finds_its_global_after_it_is_cleared_and_collected` runs the issue's sequence. It answers nil without the fix and the function with it.

Fixes #2974

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 21:27:46 +07:00
Sam Sung 36ffde560e chat: name a line's language in the client's locale (#2997)
A localized client tagged its own race's speech with a language header, so Say showed `[Common]` on a zhCN client.

The stock chat frame draws the header when the line's language name differs from `GetDefaultLanguage()` (`ChatFrame.lua:1442`). Both names come from `Languages.dbc`, in the locale's column (benilla-re `systems/ui/chatlanguage.md`). We answered `GetDefaultLanguage()` from the DBC but passed each line's language from a hard-coded English table, so the two never matched outside enUS.

The line's language is now named from the same `Languages.dbc` rows, and the English table is gone.

Test: `a_line_names_its_language_in_the_locale` gives a monster line language 7 with a zhCN row and checks `arg3` is that name; without the fix it reads `Common`.

Fixes #2996

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 20:41:24 +07:00
Sam Sung 63167449d8 A world drop leaves its release the world's, so the camera stops (#2994)
Dropping a bag item on the ground left the camera in mouse-look, with the pointer hidden, while the destroy confirmation stood.

The world drop marked its release as the interface's, so the world frame's binding never ran its up-half and `CameraOrSelectOrMoveStop` never ended the session. In 1.12.1 the drop happens inside that release: `0x514b70` ends mouse-look (`0x514c48`), then dispatches the click (`0x481f60(1)`), whose ground or nothing leg raises the confirmation. The release is the world frame's (`0x483cb0`).

The drop no longer claims the release. A press the drop takes still arms no select, so nothing else clicks.

Test: holding an item, a left click on the world runs the binding's up-half; it fails without the fix. The world-drop tests now expect the release to be the world's.

Diagnosed in #2993.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: hyrw <47274436+hyrw@users.noreply.github.com>
2026-11-05 19:24:49 +07:00
Sam Sung a1079ce6f7 M2 translucent batches draw in 1.12.1's order; mounts and items fixed (#2992)
M2 translucent batches sorted by their own centre with a file-order bias, so a glow could draw under the part it lights.

1.12.1's transparent order `0x70ae10` compares the instance's squared distance, the fill copy, the signed priority plane (texture unit `+0x02`), the vertex shader under the default mode, the batch depth, then the unit's layer (`+0x0c`). A model frame's scene skips depth fill (`0x76ccf5`). benilla now reads both unit words and re-sorts the M2 batches in that order, merged with the other transparents by depth. Texture handles are stood in for by file order, a recorded deviation.

Mount children are no longer grounded or swum as free units (`0x607a00`), and worn items take their idle sequence, or the first one, as `0x710153` arms it.

Tests use the install's HangingSkullLight and a staff whose sheen orders by shader.

Fixes #2922
Fixes #2931
Fixes #1208
Fixes #327

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 15:19:04 +07:00
Sam Sung 29d0132d8a The backface band measures only the part of a facet inside the body (#2989)
A body placed flush on a slope at a tile seam fell through the far tile: the backface band tested a facet's raw vertices, so it dropped the far floor once the body had passed part of it.

1.12.1 clips each facet into a leading face's swept prism of its own volume (`0x632700`, `0x6318c0`). It keeps the facet when a clipped vertex is ahead of −2^-20 (`0x6328a1`), or within 1/36 behind after a second clip (`0x632910`). The band now builds that volume at the capsule's feet (`0x631440`, `0x631be0`) and runs those steps; it matches benilla-re's tested port on 399,550 random cases. A facet ahead is held at any distance, recorded as a deviation, since the capsule bulges past the volume.

A real-terrain test walks a body flush on the Valley of Trials ramp over the seam: main sinks it 6.48 yd, the fix holds it.

Fixes #1121
Fixes #2958

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 13:01:11 +07:00
Sam Sung e63ff908a2 Terrain tiles are read through MHDR, MCIN and MCRF, as 1.12.1 reads them (#2988)
benilla found a tile's chunks by walking record sizes, so a Noggit export whose MCNK sizes count their header lost every chunk after the first. 1.12.1 reads the tile through MHDR's offsets (`0x6c2010`) and each chunk from its MCIN entry's file offset (`0x6c299d`), never an MCNK's size. benilla now does too.

Two more reads follow the reference. With MCNK flag 0x8000 an alpha map decodes whole at 64×64 (`0x6b0a6b`, `0x6b0ac0`), and without it at 63×63 with the edge copied. Doodads and WMOs are made only from the chunks' MCRF refs (`0x6b00f0`), so an entry no chunk references never appears. The static item and terrain shaders now sample in uniform control flow, which WGSL requires, and a lint holds them to it.

Every chunk of 2,380 install tiles parses identically before and after. Each fix has a test that fails without it.

Fixes #2981
Fixes #16
Fixes #21
Fixes #613

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-04 12:20:02 +07:00
Sam Sung bd9235f919 A version-only release bump keeps the gates' memoized verdict (#2985)
A release bump changes only `[workspace.package] version` in `Cargo.toml` and the lock's entries for the workspace's own crates. The gates' memo counted only docs as unread, so the 0.3.0 bump would have rerun the whole chain on a tree whose parent had just passed it.

No gate reads the version: it reaches only the launchers' `env!("CARGO_PKG_VERSION")`, and the build-id tests pass their own strings.

`docs_only_delta` now also keeps the verdict when `Cargo.toml` and `Cargo.lock` differ in nothing but those version lines, compared with each file's workspace versions blanked. Checked on history: the 0.3.0 bump keeps the verdict; a code commit, a dependency version in the lock, a changed edition, and the bump together with its parent's code each rerun.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 10:41:54 +07:00
Thorsten42 e2aeaecffc A glue scene seats its body and pet on the bone's animated matrix (#2984)
Fixes #2980

A glue scene's seat read only a rotation and scale parked on global-sequence keys, once, when the scene was built. That lost a seat keyed in the scene's sequence: a custom `UI_CharacterSelect` turns its seat bone 180° and scales it 0.673 there, so the body stood backwards at about 1.5×. No stock scene keys its seat that way.

The reference seats a child at the bone's whole animated matrix times the attachment position, every frame (`0x7140d8`-`0x714149`), after it animates the scene (`0x714000`). The body and the pet now take that matrix from the scene rig's pose each frame. This runs in `PostUpdate` after the rig's model pass, now the named set `RigModelPass`, and before propagation, so the seat and the scene share a frame.

Test: `a_seat_takes_the_bones_whole_matrix_at_the_attachment`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Sam <samuv.eth@gmail.com>
2026-11-03 15:56:16 +07:00
Thorsten42 6a5f0f1064 A Linux trackpad's scroll steps at 10 logical pixels per notch (#2979)
Fixes #2978

A Wayland trackpad sends pixel travel. benilla asked 100 physical pixels for one wheel step and gave at most one step per event, so at scale 1.33 a list needed about 7.5 times GNOME's notch of finger travel.

10 axis units are one step on Wayland (SDL's `WAYLAND_WHEEL_AXIS_UNIT`, GLFW, Xwayland, mutter's `DISCRETE_SCROLL_STEP`). On Linux a notch is now 10 logical pixels at the window's base scale, and an event steps once per whole notch. macOS keeps Bevy's factor and its one step per event. Line events stay at one step each, like the reference's `WM_MOUSEWHEEL` (`0x76c1a9`), and winit reports only lines on Windows and X11. The `WheelNotches` deviation says so.

Tests: `pixel_travel_steps_by_the_platforms_notch` runs both platforms' arms on any host, and `a_pixel_notch_reads_the_base_scale` pins the scale.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Sam <samuv.eth@gmail.com>
2026-11-02 17:41:22 +07:00
Sam Sung 701d52c303 Windows drops the accessibility adapter the reference never had (#2975)
Under Proton-based Wine, `tabtip.exe` is a UI Automation client, and `bevy_winit` gives every window an AccessKit provider. That traffic faults in `rpcrt4` on blocks the game has reused, which damages the heap and later crashes the client at varying addresses. Blocking `tabtip.exe` stops the faults and the crash, and other programs in the same bottle show no such faults.

The reference's window has no provider: `WoW.exe` imports no accessibility library and names none of its calls. benilla builds no AccessKit tree either.

`VideoPlugin` now drops the adapter when Windows reports a new window, which restores winit's window procedure. Other platforms keep theirs.

No test: the adapter needs a real window and the fault a UI Automation client. Built for macOS and Windows.

Refs #2932

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 06:43:05 +07:00
Sam Sung d9c6423037 README names wgpu-hal among the vendored code (#2973)
The README named kira as the only vendored code under `third_party/`, but wgpu-hal is vendored there too, under the same two licenses with its notices beside it. `third_party/alsa-0.9` stays unnamed: it is benilla's own stand-in, with no upstream code (its `BENILLA.md`).

Fixes #2972

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 22:25:18 +07:00
Sam Sung 68734926a9 release 0.3.0 (#2969)
The workspace version and its lock move to 0.3.0, and nothing else. The toolchain pin stays at 1.98.1, the compiler these checks ran on.

The Linux and Windows compile, the Vulkan run and the smoke run passed on this tree. The full gates passed on its parent (#2968) and were not rerun for the version change, at the maintainer's word.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 19:22:22 +07:00
Sam Sung 5947e700b3 Two realmlist deviations say why they differ (#2968)
`docs/DEVIATIONS.md` never said why the login screen has a realmlist control: the reason sat in a test comment, and the list leaves tests out. It is now a `Deviation:` on the control, in `AccountLoginRealmlist.xml`. The host-name port's reason, "everyday use", said nothing, so it now names the case and why it's safe: an address 1.12.1 can dial means the same here.

Comments only.

Refs #2860

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 18:51:43 +07:00
Sam Sung e0edf71751 README's status: client changes beyond the MPQ archives (#2963)
A server whose changes are all in MPQ archives plays: benilla reads the install's patch chain (`crates/benilla-formats/src/chain.rs:41`), and a client change outside the archives is what it can't follow. The status line now says that.

Refs #2863

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 18:26:13 +07:00
Sam Sung dabb331bc6 Camera verbs blend and hold; a /reload builds a new camera (#2962)
`SetView` snapped pitch and yaw, `FlipCameraYaw` was undone by the auto-follow, and a spyglass zoom left the camera at distance 0.

`SetView` blends all three by `cameraViewBlendStyle` (`0x512eb4`), and a new camera counts as moved (`0x50c400`). The flip sits outside the follow's yaw offset. The spyglass's start and end select their views, a held scope refuses, and arrival ends it (`0x5deb44`). Freelook's entry and leave stop a view's yaw and bias (`0x50f97e`, `0x50f984`).

A `/reload` builds a new camera (`0x481b4e`, `0x50c0e0`): offset, flip, moves and shakes start over, and the views reread their settings (`0x50c3db`).

Each has a test.

Fixes #1697
Fixes #1699
Fixes #1706
Fixes #2948

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 18:24:33 +07:00
Sam Sung 3409dacf0b README's status names the servers it can't play on (#2961)
"Any 1.12.1 server" overclaimed: a server that enforces Warden disconnects the session, as "Running it" says, and one that needs its own client changes won't work. The status line now says so.

Refs #2863

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 18:15:07 +07:00
Sam Sung a3530a64b0 Select screen idle and emblem; a teardown frees UI callbacks (#2960)
The select screen looped one Stand clip and never showed a guild's emblem. Select models now replay Stand with a fresh pick at each window's end, and a guild tabard asks for its guild and wears the emblem.

An interface teardown kept every store's pending callbacks, so an answer after a `/reload` raised events in the new VM. The reference frees them unrun (`0x490c35`, `0x5556c0`, `0x5615b0`), and the score board's count stands until a packet zeroes it (`0x4aabb5`). What would strand the player stays or ends cleanly, recorded as a deviation.

Tests cover the item, name and guild stores through a real `/reload`, the board's hold, the tabard and the replay.

Fixes #1314
Fixes #1316
Fixes #2946

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 17:41:32 +07:00
Sam Sung 570ccf4f4b Casts, item use, TAB and the map arrows behave as in 1.12.1 (#2957)
Casting, item use and targeting differed from 1.12.1 in eight places.

A ready cast leaves the wand's repeat running (`0x609570`), and a local refusal of the repeat spell stops it (`0x6e1cd9`). A broken use item is refused and one not worn must be equipped (`0x5d8fd6`). An item with no use spell leaves silently, ahead of the form and disarm refusals (`0x5d8fc1`).

TAB reads `targetNearestDistance` at each press (`0x494350`). TargetLastEnemy's memory is stamped as the select makes it (`0x49372f`). The minimap and world map arrows take the facing of the object the camera follows (`0x4eb07e`, `0x4a7c7c`).

Each has a test.

Fixes #1197
Fixes #1198
Fixes #2482
Fixes #2487
Fixes #2591
Fixes #2614
Fixes #2945
Fixes #2947

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 15:51:11 +07:00
Sam Sung 9136e8aaaa Seven small 1.12.1 gaps in the log, tooltips and screenshots (#2953)
Seven small differences from 1.12.1, in the log, tooltips and screenshots.

Combat log: a line needs its target held, through the gate at `0x626630`; environmental damage and four spell lines need a held unit (`0x5e8145`, `0x5e8178`, `0x5e82a8`); the enchantment log reads its owner first (`0x628f23`).

Item tooltips and trade skills walk ChrRaces and ChrClasses at the install's locale (`0x52ce14`, `0x4fea2e`) in place of English literals. The lockout warning divides signed and keeps an empty map name. A screenshot is the frame of its ask (`0x442a10`, `0x442350`).

Each has a test against those addresses.

Fixes #2078
Fixes #2384
Fixes #2480
Fixes #2485
Fixes #2920
Fixes #2943
Fixes #2944

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 14:52:24 +07:00
Sam Sung af852d03f4 README's status says what is playable and what is left (#2952)
"Complete" overclaimed, and "Addons, options" did not say what is left. The status now says the client is fully playable, what the long tail is, and that addon compatibility, the remaining options and performance are ongoing.

Fixes #2863

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 14:11:35 +07:00
Sam Sung afda4539e1 Damaged files and malformed lists behave as in 1.12.1 (#2951)
A damaged file or a malformed list took the client down, or was shown as it came.

Files: a DXT width of 0, a zero-sided BLP, an M2 under 0x11c bytes, a first sequence that ends before it starts and a large geoset group each panicked. A DXT level past the file failed the whole texture, where `0x5a8558` tests its size for zero alone. Geoset ids are 32-bit (`0x477592`, `0x47869a`).

Lists: the realm list's size and string caps are checked (`0x5ba9e7`, `0x5b22d9`), a character list over 10 or unread to its end fails (`0x5b42a0`), and a failed re-dial empties the list (`0x5b2560`).

Each has a test.

Found in Thorsten42/benilla@af86636a54

Fixes #7
Fixes #10
Fixes #14
Fixes #67
Fixes #1660
Fixes #1661
Fixes #2941
Fixes #2942

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 14:08:55 +07:00
Jonas Örnfelt a041009fb9 Caps Lock under caps:escape acts as Escape again (#2900)
Since #2429 the UI's input records are read from the window's `WindowEvent` stream. The layout remap (#602) rewrote only the typed `KeyboardInput` messages, so a key a layout remaps, such as Caps Lock under X11's `caps:escape`, reached the bindings and text boxes as its physical key again.

1.12.1 reads a key as the virtual-key code the OS layout produced (`0x42d21e` → `0x42d800`), so Caps under `caps:escape` is Escape.

`remap` now rewrites the `KeyboardInput` a `WindowEvent` carries by the same rule, in `PreUpdate`, before the records are collected in `Update`.

Test: `both_streams_carry_the_layout_key`, both streams come out as Escape.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-11-01 10:08:52 +07:00
Sam Sung 514b7d32b2 Every launcher that calls the build stamp gets the 8 MB main stack (#2940)
The Windows main-thread reserve was set only in `crates/benilla/build.rs`. So `benilla-worldview`, and every launcher built on benilla by the recipe in `extended_launcher.rs`, linked with the linker's default: 1 MB on MSVC, 2 MB on mingw. That is less than the login screen needs.

`benilla_buildstamp::emit()`, which every launcher's build script already calls, now asks for 8 MB through `rustc-link-arg`: `/STACK` on MSVC, `--stack` on mingw. Unlike `rustc-link-arg-bins`, cargo accepts it from a package with no binary, so a library that calls `emit()` still builds. The recipe and CONTRIBUTING's "Building on top" say so.

Test, mingw cross-build: `SizeOfStackReserve` is 0x800000 for `benilla.exe` (unchanged) and `benilla-worldview.exe` (was 0x200000). A library-only crate calling `emit()` checks clean on MSVC and builds on mingw.

Fixes #2934

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 08:17:05 +07:00
Sam Sung 383cf93c00 Off macOS the pointer systems run after the VM pass, as on macOS (#2939)
Off macOS, the cursor chain #2923 added ran the pointer tracking and the cursor driver unordered against the VM pass. The macOS chain orders them after it, since a Lua call in the pass can move the camera rig whose look the cursor shows. Linux's Update schedule gained 40 undeclared orders (1507 against the ceiling's 1467), so the Linux gates failed on every pull request.

The non-macOS chain now runs `track_pointer_device` and `other::drive` after `VmPass::End`, as macOS does.

Test: the schedule ceiling test passes on Linux (aarch64, in a container) and on macOS.

Fixes #2938

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 07:56:42 +07:00
Sam Sung ed4ca02a88 A building's pool draws only when its room is visited; type from row one (#2937)
A building's pool drew forever once its room had been visited, and a portal-less building with an area id never drew its pool, Northshire Abbey's wall fountain among them. In 1.12.1 the flood's visit `0x685d70` links a visited group into the liquid list (`0x685f6b`, the only link), and the liquid pass `0x684cd0` unlinks each record as it draws (`0x684e1d`). So a pool draws exactly in the frames its group is visited. The latch is gone, and the fountain draws. Across 184,624 camera poses around the Great Forge, benilla's flood keeps the lava wherever the reference's portal graph does.

A pool's liquid type read every tile row and the group's override. `0x6ba970` scans only the first row and takes the first wet nibble, and its caller never reads the override. benilla now does the same.

`WOW_LIQUID_TRACE=1` prints each pool's per-frame verdict.

Fixes #119
Fixes #65
Fixes #2492

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 07:12:21 +07:00
Sam Sung dddc644771 Units in sunlight light at 2.5 and ramp in from 1.0, as in 1.12.1 (#2935)
Units, players, creatures and game objects in sunlight were lit at ×1.0, where 1.12.1 lights them at ×2.5. The cap `min(I, 1)` was recorded as a deviation on the premise that lifting it takes sun-facing surfaces past 1.0. That premise is false: the per-vertex sum is clamped in both clients.

In 1.12.1 a node is created at intensity 1.0, and its first sync sets the target: 2.5 lit, 0.5 in the chunk's shadow, 1.0 as an interior (`0x670db0`, `0x69e280`). Each tick steps toward the target at 3.3333 × the frame time (`0x69e770`), so a unit appears at 1.0 and ramps to 2.5 over about 0.45 s. The intensity reaches the SH unclamped (`0x71c4e0`).

benilla now does the same, in the entity shader and the static one, and the two deviation notes are gone.

Tests: the ramp from 1.0, the three targets, the uncapped shader line.

Fixes #506

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 06:24:47 +07:00
Sam Sung 7361ddac1f The workspace tests pass on Windows: zone, census path and origin name (#2933)
Twelve workspace tests failed on Windows, from three causes:

- The census cut a site's path at `src/`, so a Windows path kept its whole prefix. It now cuts at either separator and prints `/`.
- The raise-origin panic named its caller from the backtrace, which a build without debug info resolves wrongly. It names the raise by its line, and lists callers only from frames that carry one.
- Ten zone tests set `TZ` through `std::env`, which never reaches the Windows C runtime's own copy of the environment. In 1.12.1, Lua's `date` and the screenshot names read the zone through the CRT's `_tzset`, which honours `TZ` (`0x4145d6`). The logon bias reads `GetTimeZoneInformation` alone (`0x4297c0`). The test helper now writes `TZ` where the CRT reads it, and the logon bias calls `GetTimeZoneInformation` directly, as the reference does.

Cross-checked for `x86_64-pc-windows-gnu`.

Fixes #2927
Fixes #2928
Fixes #2929

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 05:47:43 +07:00
Sam Sung e6ed2a2a9d The field of view follows the aspect; a missing model draws the cube (#2930)
Three gaps:

- The world camera's vertical field of view was a fixed 45°. 1.12.1's camera holds π/2 (`0x50a707`), and its projection takes the vertical half-angle as fov / (2·√(aspect² + 1)) (`0x5c3cc0`). That gives 54.0° at 4:3, 47.7° at 16:10, 44.1° at 16:9 and 35.0° at 21:9. benilla now derives it from the viewport's aspect and re-derives it on a resize. The spyglass keeps its 6× narrowing.
- A unit, item, effect or doodad whose model file is missing drew nothing. `CM2Scene::CreateModel` (`0x707350`), which every lane creates through, opens `Spells\ErrorCube` instead (`0x70737f`). benilla's asset readers now do the same for a missing `.m2`.
- `view::msaa_from_env` was dead code that defaulted to 4x, and is deleted.

Tests: the field of view at each aspect, and `CreatureDisplayInfo` 4 (`CrystalSpider.mdx`, absent) loading the cube.

Fixes #124
Fixes #330
Fixes #129

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 05:00:44 +07:00
Sam Sung 36e41ecf42 Item-text queries carry a u64 key; stats ask per table; console repeat (#2926)
Three gaps:

- CMSG_ITEM_TEXT_QUERY sent the text id, the mail id and a u32 0. `0x569980` writes the text id and a u64 key (`0x569a99`): the mail id under high dword 0x70000000, an item's guid, or 0 for the invoice. benilla now sends that key. vmangos reads only the first dword after the text id, which is unchanged.
- A group list and a deactivate asked for stats once per member. `0x4e85d0` and `0x4badc0` each send their own request, party first, so a subgroup mate is asked twice. benilla now runs both legs.
- `/console repeat N <command>` (`0x639250`) was missing. It now runs the command once a frame through the console executor and counts down (`0x63bd50`).

Tests: goldens for the three keys, the request count and order, the repeat count.

Fixes #2601
Fixes #2604
Fixes #2587

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 04:18:27 +07:00
Sam Sung 01ef631ab3 Area triggers heartbeat first; far swings stop attack; ignored GMs speak (#2925)
Three wire gaps:

- An area trigger sent CMSG_AREATRIGGER alone and at any health. `0x5e2110` runs only while health is above 0 (`0x5e215e`). On entry it sends a heartbeat from the live pose (`0x5e221e`), then the trigger (`0x5e225d`), so the server checks the trigger against a fresh position. benilla now does both.
- A landed swing on a far victim kept auto-attack on. `0x5ea800` sends CMSG_ATTACKSTOP when the 3D distance is at or beyond 4 × max(both combat reaches + 4/3, 5) (`0x5ea899`, `0x5ea8a8`), as after a knockback or a blink. benilla now does the same.
- An ignored GM was silenced, and every ignored whisper drew CMSG_CHAT_IGNORED. `0x49d736` drops an ignored sender only under a non-GM tag, and replies only to such a whisper. benilla now does the same.

Tests: the heartbeat-then-trigger order, the reach boundary, and the tag and type matrix.

Fixes #2595
Fixes #2598
Fixes #2603

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 03:39:48 +07:00
Sam Sung d69afa8155 Shapeshifted item use is refused locally; a helm reads its race prefix (#2924)
Two gaps against 1.12.1:

- A shapeshifted player's item use went to the server and could ask to bind the item first. In 1.12.1 `0x5d9105` refuses it when the form is no stance (`0x60e9f0`) and its `SpellShapeshiftForm` flags lack 0x8, or carry 0x40 and the item is not equippable. It shows ERR_NO_ITEMS_WHILE_SHAPESHIFTED and sends nothing, before the bind ask. So cat, bear, travel and aquatic form, and ghost wolf, allow only equippable items, Tree of Life none, and stances all. benilla now refuses the same way.
- A helm's model took its race prefix from an eight-entry table clamped to Troll. `0x4799a0` reads the `ChrRaces` row's client prefix and attaches no helm for a race with no row. benilla now does the same, so a goblin's helm loads `_Gb`.

Tests: the route order, the stock forms and the stock race prefixes.

Fixes #2477
Fixes #611

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 03:08:15 +07:00
Sam Sung 8df5ff2286 The pointer is one flag the last call sets; merged status lines reformat (#2923)
Two UI gaps:

- The pointer stayed hidden while any of mouselook, a playing cinematic or the glue's `HideCursor` held. In 1.12.1 the pointer is one device flag (`[dev+0x2880]`, `0x595c20`), and the last call of `0x58b590` wins. Its eight sites are the glue's `ShowCursor`/`HideCursor`, a cinematic's start and end, leaving the world, mouselook's start and end, and the glue build's `SetCursor`. benilla now keeps that one flag, set by each site in order. So releasing mouselook during a cinematic shows the pointer.
- Merging one load status into another copied lines verbatim. `0x41a100` re-adds each line through the target's Add with its text as the format, so a `%%` collapses, a line over 255 bytes is cut and an empty one is dropped. The merge now does the same.

Tests: `the_last_call_on_the_device_decides`, `a_merge_formats_each_line_again`. Built for Windows too.

Fixes #2575
Fixes #2621

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 02:33:57 +07:00
Sam Sung 9084eacd7f The loose-source test builds on Windows, its unreadable file unix-only (#2921)
`the_loose_source_falls_through_per_candidate` made a file unreadable through `std::os::unix`'s `PermissionsExt` with no `cfg(unix)`, so the Windows test build failed and no test ran there.

The permission calls are now unix-only. Elsewhere the file stays readable, and the test already skips its second assertion in that case. A cross-check of every workspace test for `x86_64-pc-windows-gnu` finds no other break.

Fixes #2916

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 02:05:45 +07:00
Sam Sung e475fb8e2b The console commands gxRestart and bind are registered (#2919)
Two console commands 1.12.1 registers were missing, so each ended in `Unknown command`.

- `gxRestart` (`0x63b360`, handler `0x639f60`, category 1, no help) applies the latched gx CVars. A console gx write printed `set pending gxRestart` and then never applied. It now raises the same restart `RestartGx()` does.
- `bind` (`0x4b6050`, handler `0x4b60b0`, category 5, no help) takes the key as the first space-split token, cut at 31 bytes, and binds the rest of the line on the live set with no `UPDATE_BINDINGS`. An empty rest unbinds.

Both are listed by `help`, which answers them with "No help yet".

Tests: `help_knows_gx_restart_and_bind`, plus `ConsoleExec` tests for each command.

Fixes #2585
Fixes #2586

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 01:21:24 +07:00
Sam Sung 7043c1f440 A missing base archive stops the boot, and only 0x200 sectors decode (#2918)
Two archive-chain gaps:

- The MPQ reader decoded a shrunken sector under block flags `0x300`. The one sector reader in 1.12.1 (`0x651450`) masks the flags with `0xff00` and reads such a sector only when the result is exactly `0x200` (`0x651993`-`0x65199f`). Any other codec flags fail the read. benilla now fails it the same way. A sector that did not shrink is still copied under any flags (`0x651982`).
- A base archive missing from `Data` was mounted around. In 1.12.1 the first base archive that will not open, `model` first, ends the client with `Failed to open archive %s: %s` (`0x4038ef`). benilla now stops at mount and names it in the existing fatal dialog. `speech2.MPQ` and the patches stay optional. The no-install note's premise, that the reference goes on past a missing archive, is corrected.

Tests: `a_shrunken_sector_reads_only_under_exactly_the_compress_flag`, `a_missing_base_archive_is_an_error_naming_it`.

Fixes #2716
Fixes #2616

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 00:56:36 +07:00
Sam Sung 91d92a2714 A short AUTH_OK tail logs in; object reset-state and self-control fixed (#2917)
Three wire and unit-state gaps:

- An AUTH_OK or queue reply with a 5 to 8 byte billing tail failed the world connect. `0x5b41b0` reads each field through `GetUInt32` (`0x418eb0`), which writes nothing on a short read, and admits the player anyway. A short field now keeps its old value. Test: every tail length from 0 to 9.
- `SMSG_GAMEOBJECT_RESET_STATE` (`0x6e9790`) was unhandled. An object now re-applies its descriptor state, undoing the open-lock and loot predictions. Test: a byte-exact golden test of the body and a handler test.
- `IsSelfControlled` (`0x5fa550`) now reads flags 0x2 and 0x1, the charmer, and possession, which answers with the charmer's or creator's own reading. A moving charmed player's emote is no longer refused.

Fixes #2681
Fixes #2582
Fixes #2682

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 00:30:01 +07:00
Sam Sung 7df7e418b3 A verb's events run before its next send, and the census enforces it (#2915)
1.12.1 runs a signalled event's handlers inline, before the verb that raised it goes on. The census that refuses a send, lock or cursor write made while such a handler is still held now panics by default in a debug build (`BENILLA_SEND_CENSUS_PANIC=0` turns it off), after a survey of the whole suite came back clean.

The survey found one real ordering defect: `OpenItem` sent `CMSG_OPEN_ITEM` before its lock's `ITEM_LOCK_CHANGED` listeners ran. In the reference the lock signals at `0x495415`, before the send at `0x5edd26`. The send is now owed past them, as the loot release is.

Two cells, the used mailbox and the item-text reader's queue, were marked written by a use that touched neither, and now are not. The survey's listener frame is hidden, so it no longer moves frame levels.

Tests: `an_open_items_lock_listeners_run_before_its_send`, `an_item_use_that_opens_no_window_writes_none_after_its_held_report`.

Fixes #2271

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 00:02:37 +07:00