aorecomp

Anarchy Online classic in the browser

git clone https://aorecomp.ubeagle.com/code/aorecomp.git


docs/city-doors.md (11532B)


Shared early-route city doors

The server now sends native DoorStatus updates to the existing authored city objects. It opens a selected door when a living, ready 14.9.1 player approaches within five horizontal metres and eight vertical metres, and closes it after the last eligible player leaves a six-metre horizontal envelope. The extra metre prevents repeated reversals around the opening boundary. These distances are reconstruction policy, not recovered historical server constants.

State is shared per playfield/door, remains in memory and is replayed after scene loading. The existing movement checks, access requirements, shop return context and authored destinations still decide zoning. A door update does not grant entry or replace the original object, mesh, transform, events or other stats. No new persistence writes occur on approach or departure.

Finite route scope

All ten selected statels are authored unlocked, initially closed, and without stat259 bit64 (which would prevent native closure). The implementation deliberately does not unlock unrelated mission, apartment or restricted entrances.

Route endpoint Door identity Template Placed mesh
Entertainment to Trade 705 / 0xc00502c1 96272 40820
Trade to Entertainment 710 / 0xc00002c6 96272 40820
Entertainment Emporium Equipment 705 / 0xc01102c1 41565 42857
Emporium interior return 1183 / 0xc000049f 41888 41831
Entertainment Special Shop 705 / 0xc03902c1 41565 85399
Special Shop interior return 1191 / 0xc00004a7 41888 41831
Old Athen basic supermarket 540 / 0xc01d021c 41565 55887
Clan shop interior return 1180 / 0xc000049c 41551 41469
Borealis basic supermarket 800 / 0xc0170320 41565 55886
Neutral shop interior return 1186 / 0xc00004a2 41893 41847

The Special Shop entrance at approximately [855, 18.68, 447] is the closest mapped shop entrance to the Bronto Burger visitor spawn at [960, 16.5, 510]. This is the working interpretation of the reported nearby shop; Emporium at [765, 19.13, 516] is also included. No specific shop name or coordinates accompanied the report.

The selected type51016 placements come from original resource1000026. The mesh column includes descriptor overrides rather than assuming the template's default mesh. The retained resource audit is local/city-doors/routes.txt, derived from local/old/mission-interior/door-placements.json and door-catalog.json, whose index digest is 46e5dc54af9358cc9bff05f4358e86af630e497bc677f361c133c88073b84d71. Their positions and links agree with server/assets/zone_links.yaml.

Native state contract

Original 14.9.1 kkr.dll SHA256 is a37bc1c15053fdcc5572772309f7074c4f83baffe2faa164df40b059b7c480c0. Status Apply at 0x100b07a0 finds the existing Door_t, applies lock/open state and sets Door byte+0x1c5 when the additional latch flag is true. A false flag does not clear that latch. The periodic update at 0x1008ce90 otherwise closes an open door when its local character-collision set empties. Latching an unlocked door therefore lets the server own closure across observers. Collision can still open locally; the server's earlier approach update keeps that path from being the only source of presentation.

Opening at 0x1008e090 sets Flags bit128; closing at 0x1008e140 clears it and reverses animation unless stat259 bit64 prevents closure. The existing packet builder preserves the status format; no native animation code is changed. See mission door protocol evidence for serializers and the remaining unknown original producer policy.

Reused evidence: ev_11f652b6807fe3fa84d277db4a9fefb8037f452364a933b752440f84a9d5a123 (status Apply) and ev_20aaec6976d9af9989fa5293d7db5fc6ed96b58271d485bd331cd982efdf92c2 (collision), retained under local/old/mission-interior/. The maintained lifted symbols are client/game/kkr.dll/lifted-0052.c::sub_360B07A0 and client/game/kkr.dll/lifted-0041.c::sub_3608CE90.

The read-only browser harness now includes type51016, its flags/latch and native animation duration/time. Door_t embeds n3Dynel at+0x8c. The mesh pointer is n3Dynel+0xc4; its root frame and duration are at+0x10/+0x24, and root-frame time at+0x12c. These follow llr.dll::sub_3803DBC0, bbr.dll::sub_2509B3A0 and bbr.dll::sub_250E3010. Snapshot tests verify that observing these fields does not mutate guest state or advance animation.

Reproduction and verification

The original server baseline at local/city-doors/20261105-113316/ shows Emporium closed on both clients with the traveler approximately three metres away. The first shared-state captures at 20261105-113922/ show its panel raised on both replicas, with native time reaching its 0.333333-second endpoint. The whom-pah's mesh40820 also has a real moving panel: 0.666667 seconds, exposing a blue tunnel when raised. Its template name Dummy wompah noselect is not evidence that the visible portal lacks a door.

TestBrowserCityDoors uses controlled starts eight metres in front of each original endpoint. Ordinary browser walking drives approach, withdrawal and passage. Both clients must reach the matching native flags and animation endpoints. An observer reconnects once while open and once while closed. Passage must reach the expected native and authoritative playfield, preserve the remaining observer's world, and close the departed entrance. Each direction uses its own fixture; shop returns carry the normal originating-door context.

Go regressions cover shared state, no duplicate transition packets, the last visitor keeping a door open, hysteresis, unavailable players, access requirements, scene replay and opening before held-movement zoning. Existing door serializers, whom-pah mapping and shop return persistence checks protect the unchanged admission/destination paths. These controlled fixtures do not establish earned progression or original timing policy beyond the actual asset animation lengths.

The Old Athen storefront has a raised platform with a ramp across its front. Its fixture follows that ramp rather than walking into the platform edge. A roughly 0.12-metre doorway lip then stops ordinary walking even with the panel fully raised. The same native stall occurs with server movement corrections disabled (20261105-120350/clan-shop, browser-native-only.log). A bounded comparison of server/player_collision.go::alignSurface with original qqr.dll::sub_42012A50 found no discrepancy in the relevant raised-probe path; this is not evidence of a general step-up guarantee. The passage fixture uses ordinary Space input at this threshold. No collision, zoning radius or original geometry is changed to bypass it.

November 5 result ledger

Before shop collision support, nine of ten endpoints passed the full two-client scenario, including passage, open/closed reconnect and authoritative arrival:

Capture directory under local/city-doors/ Passing endpoints
20261105-114234 Entertainment shop, Entertainment to Trade, Trade to Entertainment
20261105-115652 Emporium return, Special Shop return
20261105-114805 Entertainment Special Shop
20261105-115113 Clan shop return, Borealis shop, Neutral shop return

Some batches also contain failed scenarios; these are per-endpoint results, not a claim that every batch passed. Interior observer positions were tightened to avoid columns, and reconnect now restores the same first-person framing. All selected portals have moving panels; none needs a synthetic animation.

20261105-120928/clan-shop demonstrates normal forward-jump passage into 1180, correct source closure and visibly settled native arrival. Its final assertion failed: native position was approximately [201.01, 4.26, 160.5], versus server [201.00072, 5, 160.50998]. The server supported outdoor terrain and generated missions, but lacked public shop collision. Consequently it kept the authored door height instead of following this native floor. The strict 0.5-metre three-dimensional arrival assertion remains in the test.

The earlier 20261105-120737 jump attempt fired during turning and landed before forward movement. The fixture now waits for the actual forward key event. The bounded collision audit and native-only diagnostic answer only the exterior threshold question; they do not establish interior collision support.

Shop collision

The four selected interiors (1180, 1183, 1186 and 1191) now load original room records, dungeon floor grids and per-room collision surfaces. They use the same floor, sphere, line, room admission and movement routines as generated interiors, while their immutable scenes stay separate from generated mission ownership and retirement. No floor constants or doorway coordinates are adjusted.

LLR CreatePlayfieldFromResource (0x100291d0) and InitializeSpace (0x10029bc0) retain the authored room poses. The room reader (0x10033d50) initializes placed/template positions and rotations identically. LoadSurface (0x1003edd0) selects resource1000013 with identity (playfield << 16) | room. LLR sub_3802C270 reads serialized neighboring room indices, skipping exterior and self links. Static GetSafePos (KKR 0x1014dad0) uses room 0: the resource constructor initializes its safe-room index to zero and the static reader does not overwrite it. These are original resource contracts, not inferred geometry. Evidence is retained in local/old/mission-interior/llr-evidence.json, llr-room-evidence.json, llr-room-surfaces-evidence.json and kkr-room-admission-evidence.json. Authored door-to-link binding beyond the selected unlocked shop routes remains outside this change.

TestClanShopArrivalSettlesOnOriginalFloor failed at Y=5 before this change and passes at Y=4.26 using normal CharacterReady and simulation ticks. A second regression walks between the Clan shop's authored rooms in both directions. All 34 focused collision, room lifecycle, visibility and door test roots pass (interior-regressions.log), along with go vet ./server.

The corrected Clan browser scenario passes in 20261105-121750/clan-shop: native arrival [201.009995, 4.26000309, 160.5] agrees with authoritative [201.01, 4.26499, 160.50998]. The strict arrival assertion is unchanged. Both clients show the source door closed after passage. All seven other affected shop entry/return scenarios pass in 20261105-121950/ (browser-shop-floors.log). Together with the two unchanged whom-pah endpoints in 20261105-114234/, this completes the ten-endpoint A4 scope. The arrival views were inspected, and all test-owned browsers and servers exited. A4 is closed; exact original proximity timing and other public interiors remain outside this finite scope.

Nineteen focused Go test roots passed (go-regressions.log), along with go vet ./server, the native browser snapshot test, JavaScript syntax and diff checks. Test-owned browsers and temporary servers were closed after every run.

Published raw WASM SHA256 is 9ced727e853ba145c8945a31a001ea3c3ff997373603135628a44d4b2d5cc45f. The native changes only expose read-only observations. Publishing exposed prior drift between the source HTML and served account UI, so the served page was preserved with its updated decoded download size; the manifest matches the published files. Source reconciliation is recorded separately in feature backlog.