aorecomp

Anarchy Online classic in the browser

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


docs/actor-run-speed.md (5593B)


Actor snapshot Run Speed

SimpleCharFullUpdate (0x271b3a6b) supplies the player's trained RunSpeed stat 156. FullCharacter supplies the same raw stat to the owner. Equipment OnWear and active nano replay then contribute their modifiers once. Sending an effective skill here would duplicate modifiers; including ability trickle would also disagree with the native movement getter's mode 3.

The actor snapshot previously used raw 100 for every player. A newly created observer could therefore predict different movement from the owner even when both received the same movement controls. The server now uses the player's stored raw skill. NPC snapshots retain this server's fixed 100 movement foundation, matching its existing 4.5 m/s chase policy; this change does not establish historical species-specific NPC speed.

Original receiver contract

Original target: anarchy-vanilla-14.9.1/kkr.dll, SHA-256 a37bc1c15053fdcc5572772309f7074c4f83baffe2faa164df40b059b7c480c0. Addresses below use original image base 0x10000000.

The field follows the vehicle stream and optional HeadMesh. Reader 10082da0, at 10083681..100836a7, selects its representation using the message flags:

Flag 0x2000 Wire field Meaning
Clear One unsigned byte Raw value 0 through 255
Set One big-endian signed short Raw value -32768 through 32767

The reader stores a word at message offset 0x190. Activation 100821d0, at 1008251b..1008252c, sign-extends it and sets raw stat 156 through 1006e030. No scaling or clamping occurs. Narrow ff is positive 255; wide 0100 is 256 and 012c is 300. Values above 32767 cannot represent a positive stat through this field.

The mode-3 stat getter (1006dfb0 / 10075cd0) adds the separate modifier map to the raw table. Movement getter 10047be0 requests that mode for RunSpeed. Skill-window values can include ability trickle and should not be mistaken for the movement input.

The message's shipped payload writer 1010def0 is an empty ret 4 stub. There is no recovered original server writer choosing a representation or handling out-of-range input. This server's shortest-form choice, byte through 255 and flagged short above it, is a reconstruction compatible with the proven receiver. It is not an original-server capture.

The retained source ledger is docs/research-notes/actor-speed-research/native/README.md: 15 complete original REA records and 10 validated citations. Principal reader evidence is ev_9ba1ee861536b7169d3adbd6fb561ea6e850f0c230ea1bbb9d80c38d02a5dc59; activation is ev_d1c6525d8047faf81030e0b0e00f69e3bec7b13e1e1c8c84779183724bffb2ba. Supporting maintained-source checks and their limits remain explicit in that ledger. No new binary analysis session was opened.

Server and automated verification

characterPacket selects the width and flag before writing its header. targetPacket accounts for the extra byte when locating and converting the following material list. Both compact and wide players retain all nine materials, including the vehicle surfaces.

server/actor_speed_test.go covers raw values 0, 5, 254, 255, 256, 1000 and 32767, both NPC appearances, unchanged NPC speed, accepted training across 255, a worn Kodaik's +150 and Swiftness's +10. An actual world handshake to a late observer, repeated after database restore, verifies raw 256 and one separate equipment/nano replay. The regressions fail against the previous constant field.

Focused actor/appearance/vehicle/movement checks passed in 48.729 seconds. Three race-detector repetitions passed in 100.749 seconds. Vet passed. The full Go suite passed 4870 tests and subtests: server 729.108 seconds and game data 8.860 seconds.

Actual WASM verification

Two owned Chromium clients on the GPU reproduced raw 300 on the owner and 100 on its observer before the fix. The other player's owner/observer values were 5/100. After updating the single preview, both views agreed at 300 and 5. Captured snapshots used the wide field for 300 and the compact field for 5 and 255, without corrupting the subsequent material list.

Native skill-window training crossed from 255 to 257 and persisted the raw value and IP charge. Swiftness added 10 and the Kodaik added 150, producing 417 in both clients' movement inputs. A fresh observer, owner replacement and actual server restart all retained raw 257 plus exactly 160 in modifiers. Simultaneous read-only samples while holding W measured native maximum forward velocity 6.085000038 m/s on both clients. Their sampled positions differed by 0.073835 m; stopped horizontal positions agreed within the 0.125-metre compact coordinate step.

Removing the Kodaik retained the nano's 10; cancelling Swiftness then restored 257 in both views. Another observer reconnect retained 257 with no residual modifier. SQLite retained raw 257, the returned vehicle's original identity, and no active nano. Both clients rendered and accepted input without browser errors or unsupported adapters. No client rebuild or native behavior change was required.

The wire, native heaps, SQLite snapshots, screenshots, GPU identity and verification.json are under local/actor-speed-smoke/. All game actions used native keyboard/mouse input; public control routes supplied owned fixtures, and the probes only read memory. Both test clients were closed. Cleanup removed only players 53/54 and their remaining vehicle, with matching unrelated-row hashes and SQLite integrity/foreign-key checks. Existing players 8/24 remain, and one shared preview serves the default ports.