aorecomp

Anarchy Online classic in the browser

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


docs/remote-reload.md (3958B)


Remote weapon reload

A committed explicit reload now sends ReloadIIR 0x26515e61 to the owner and ready observers in the same runtime playfield. GenericCmd acknowledgement stays private. Observers receive the committed update even if the owner's reply fails. Failed transactions and refused requests publish no remote success.

Original receiver

Original KKR apply 10080ca0 resolves the outer character identity, then calls that character's weapon holder 1007bca0. Its inventory update selects the receiving character's inventory helper, rather than the local player's helper. Normal page 104 resolves through helper+0x0c in 10061800; 10062320 updates that container's row count, and 1002d2f0 ignores an absent row. The depleted path 10062440 uses the same character-scoped resolver before deletion.

The holder sets stat 26 on the referenced WeaponItem and creates native action category 5 with its RechargeDelay. Reload chat text is guarded by the local character flag. The static receiver therefore supports remote weapon state and timing without applying the other player's ammunition transfer to the local inventory. The two-client regression below checks both update and deletion.

Complete original evidence, matching snapshots, SHA256 and individual Evidence IDs are retained in docs/research-notes/remote-reload/README.md, native-routing.json and evidence.json, together with the earlier local/ranged-research/ export. These are original-client observations. They do not establish the original server's stack selection, automatic reload, cancellation or scheduling policy; those remain separately documented in the ranged/reload audit.

Focused verification

TestBrowserRemoteReload starts with two controlled QL30 Colt pistols. The shooter has an empty gun; the observer has nine loaded rounds and seven Bullets in the same ordinary slot as the shooter's ammunition. Real pickup/right-click input reloads the shooter. Both native holders must receive the loaded count and the shooter's action 5 before any attack. The observer's own gun, stack and action state remain unchanged.

Initial shooter stack Loaded after reload After first shot Remaining stack
100 20 19 80
5 5 4 removed

Both clients then consume exactly one queued native weapon result, with read/write indices 1/1, and show the same 72-point impact on the controlled target. Page replay retains both native round counts; fresh Go database loading retains exact weapons, remaining stacks, quantities, cash and allocation. The scene, skills, weapons and ammunition are fixtures, not earned progression or acquisition evidence.

The corrected baseline uses an explicit overlay of the original ranged.go. The shooter loads 20 rounds while its live observer remains empty through frame 756, without an attack. This fails in 28.35 seconds. The initial pair of startup timeouts came from an uncommitted observation-layout mistake and are excluded; the ledger retains their diagnosis and corrected-layout unit failure.

The public-handler regressions cover partial/depleted stacks, one-time publication, another playfield, failed/ignored writes, failed COMMIT, retry and lost owner output. They preserve the observer's separate items through cold loading. Read-only C snapshots expose bound WeaponItem ammunition and local/ remote action categories without calling guest getters or changing queues; their unit covers bound/unbound controllers and register/queue preservation.

The final two-client run passes both cases in 65.57 seconds. All 16 retained stage traces have zero errors or dropped events. Related server coverage passes 76 roots / 496 results in 72.96 seconds; focused race coverage passes five roots / 10 results in 96.69 seconds. Maintained-package vet and the rebuilt C snapshot unit pass. Artifact paths and an independent trace/hash audit are retained under local/remote-reload/.