aorecomp

Anarchy Online classic in the browser

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


commit 8c66a8c14379ed3dcd08e63104bc8a4ed7b9caba
parent 58481396e5454eed1861e767d027bd3708184c3e
Author: anon <anon@example.com>
Date:   Mon, 26 Oct 2026 04:21:33 +0000

Document native player following and its authoritative movement gap

Bind ordinary /follow to FollowTarget and the shared PlayerVehicle arrival
controller, separately from the exported CharacterAction29 sender. Record
complete source equations and the remaining authoritative lifecycle work.

Two GPU WASM clients verify the response bridge and expose stale Go
positions without automatic movement snapshots. Retain the prototype as
research and restore the verified preview rather than enabling that gap.

Diffstat:
MTODO.md | 27+++++++++++++++++++++++----
Adocs/player-follow.md | 192+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mdocs/server-action-coverage.md | 10+++++++++-
3 files changed, 224 insertions(+), 5 deletions(-)

diff --git a/TODO.md b/TODO.md @@ -1527,10 +1527,29 @@ and unresolved indoor lifecycle are explicit in [flight](docs/vehicles.md#yalmah restrictions. Check resource refunds and observer isolation when cancelling during an actual nano cast; the generic abort and camping UI regressions do not establish every combined lifecycle rule. -- [ ] Implement player Follow from the original action29 request. Recover - target eligibility and FollowTarget delivery before sharing movement logic. - Check self/invalid/dead/different-zone targets, moving leader, keyboard - cancellation, zoning/disconnect and owner/observer/server positions. +- [x] Recover the ordinary 14.9.1 player `/follow` protocol and movement consumer. + Two hardware clients capture FollowTarget (0x260f3671) with a 2.5 scalar and no + correction/path; it is distinct from the exported CharacterAction29 sender. + Source RTTI establishes PlayerVehicle steering for owners and remote players, + the four-unit offset, ordinary movement cancellation and preserved mouse20 + rotation. A response-only prototype proves native following but exposes stale + Go positions until manual cancellation; it is not enabled in the server. + Ordinary flat-ground acceleration/braking/integration equations and complete + source hashes are retained. See [player following](docs/player-follow.md). +- [ ] Implement authoritative player following through its native FollowTarget + request. Couple transient target/velocity state, shared native arrival physics, + position consumers and periodic checkpoints before enabling the response. + Preserve body-mass/total-mass force limits and native braking rather than + fixed-speed steps. Check owner/observer/server positions during movement and + arrival, late observation, target changes/chains/cycles, keyboard cancellation + versus mouse20 rotation, roots/snares, terrain/flight, death/despawn, zoning, + disconnect, reconnect/cold checkpoints and zero routine DB churn. Establish + self/dead/unknown/different-zone target policies and reject forged ownership, + corrections and waypoints. The echo-only experiment is not completion. +- [ ] Establish the actual caller and server contract of the exported + N3Msg_Follow CharacterAction29 method. Its sender body is recovered, but + ordinary `/follow` uses a different request and does not establish this API's + recipient, eligibility or response. Keep the two paths distinct in tests. - [ ] Implement concealment and sneak through the original actions54/163. Recover contests, movement restrictions, target eligibility, cancellation and visibility publication. Check threshold boundaries, combat, two observers diff --git a/docs/player-follow.md b/docs/player-follow.md @@ -0,0 +1,192 @@ +# Player following + +The ordinary 14.9.1 `/follow` command sends FollowTargetIIR_c, key `0x260f3671`. +It does not send the CharacterAction 29 constructed by the separately exported +N3Msg_Follow method. Receiving and echoing the ordinary request enables native +following for both the owner and observers, but does not update the server's +position: the captured following session sent no movement snapshots while moving. +Authoritative following remains unimplemented pending coupled motion, +lifecycle and checkpoint handling. + +## Request and receiver contract + +The shipped `cd_image/text/TipOfTheDay.txt` documents selecting another +character and typing `/follow`. Maintained KKR `sub_36053BE0` compares the +command at 0x36055ae1, resolves the selected target, checks the follower's vehicle +state, and constructs FollowTarget through `sub_3607E2C0`. It supplies the owned +actor, selected target, float 2.5, control 0, zero position and no waypoints. The +packet is passed through llr!n3Dynel_t::SendIIRToObservers. The optimistic green +"Following <name>..." text is produced locally; it does not prove the response +was accepted or a follow controller was installed. + +The captured request is 58 bytes before alignment padding. After the native +13-byte IIR prefix, its subclass is 29 bytes. The Go dispatcher expands the +prefix to 16 bytes, producing this 45-byte handler body: + +| Handler offset | Type | Captured field | +| --- | --- | --- | +| 0 | uint32 | Key 0x260f3671 | +| 4/8 | two uint32 | Owned actor identity, type 50000 and character ID | +| 12 | uint32 | Pass-on 1 | +| 16/20 | two uint32 | Selected actor identity, type 50000 and character ID | +| 24 | float32 | 2.5, bits 0x40200000 | +| 28 | byte | Control 0 | +| 29/33/37 | three float32 | Zero position correction | +| 41 | int32 | Zero waypoint count | + +All wire numbers are big endian. Padding is outside the message length and +must not be interpreted as another field. The general class also supports +position corrections and up to 30 waypoints; the captured player request does +not authorize a client to supply arbitrary corrections or NPC routes. + +Registration 0x36016450 binds the class string to factory 0x360163d0, which allocates +0x1a8 bytes and calls 0x3607e220. Its vtable 0x36171720 binds reader 0x3607e540, +writer 0x3607e490 and activation 0x3607e690. The activation resolves the subject, +optionally corrects position, dispatches the control byte, then installs the +target through 0x36048260. The control 0 transition leaves the current movement +state unchanged; it does not need a guessed walk/run event to start following. +The installer stores a target pointer at vehicle+0x160. Its float argument is +not read in the complete maintained body: 2.5 must not be assumed to set the +native player's stopping distance. + +PlayerVehicle vtable 0x36170fe8, bound by source RTTI to PlayerVehicle_t, has +steering 0x3604ba20 at slot+0x4c. SCFU's factory selects NPCVehicle only for its +NPC flag mask 0x1; ordinary remote players also receive PlayerVehicle. Both +owner and observer therefore consume the same follow target. NPCVehicle's +0x3604af50 is a different steering consumer; the older retained evidence index +incorrectly labels both consumers NPC-only. + +Admitted ordinary movement activation 0x360439e0 clears following for every +action except 20. Extended activation 0x36047350 follows the same rule. Rotation +action 20 preserves it. Target installation/removal is shared through 0x36048260; +an accepted manual movement action can cancel following without a separate +target-clear packet. Destructor 0x36047964 also clears the target. + +SCFU reader 0x36082da0 accepts an embedded follow identity and waypoint count/list +under flag 0x00010000, after active-nano restoration. Activation 0x360821d0 installs +that target at 0x360828c6. Late-observer restoration must establish both actors +before replaying following; the current Go snapshot does not supply this state. +The exact historical server correction cadence and every reference-deletion +callback remain unestablished. + +## Movement arithmetic and authority + +PlayerVehicle calls shared steering 0x36048430 with a true argument. It checks +movement permission 4 and calculates the full 3D target delta. At squared +distance <= 16 it returns the current position. Otherwise it returns a point +four world units short of the target. NPCVehicle calls the same helper with +false and takes the waypoint/terrain path instead. + +This target point is input to QQR Vehicle::SteeringDirArrive, not an instruction +to move at constant speed. Maintained 0x42015fe0 checks the horizontal arrival +crossing and calls 0x42015e90 with tolerance 0.2. The latter derives desired speed +from distance and braking distance, capped by maximum velocity, then derives a +damped force from the desired and current velocities. The integrator clamps +force and velocity and advances position using the updated velocity. Body mass, +total mass, maximum force, braking distance and timestep behavior matter. +Discarding them would produce another movement implementation with different +arrival behavior. Exact source equations, constants and remaining geometry, +encumbrance and integration boundaries are retained in +`local/player-follow-research/physics/`. + +For the ordinary unobstructed level-ground branch, with arrival point `g`, +position `p`, velocity `v` and maximum speed `V`, the recovered equations are: + +```text +desiredVelocity = normalize(g-p) * min(V, 4*length(g-p)) +maxForce = min(10000, 2*totalMass*V) +force = clampLength(4*bodyMass*(desiredVelocity-v), maxForce) +v = clampLength(v + force*h/bodyMass, V) +p += v*h +``` + +Braking distance is `V/4`, computed before the force cap. Total mass includes +carried mass; the integration denominator uses body mass. Arrival halts inside +a strict 0.2 radius or after crossing the arrival point horizontally. Previous +position changes once per outer Run, while force is recomputed per substep. +The default maximum substep is 0.4 seconds; nonpositive or greater-than-four +second intervals do not advance the integrator. A chosen Go tick rate must +be verified against actual native motion, including the full gravity, surface +and collision branches. The encumbrance multiplier depends on a global flag +whose effective live/default value remains unresolved. + +The inspected following path has no automatic movement-message publisher. +All direct maintained calls to ordinary CharDCMove's constructor come from +N3Msg_MovmentChanged; extended action 20 comes from rotation input/flush. That +bounded source search alone cannot prove all possible outbound behavior, but +the hardware capture below confirms the missing snapshots in the tested flow. + +The server needs transient follow state and authoritative motion, shared with +its position consumers and periodic checkpoints. It must retain rotation 20, +cancel on other admitted movement, stop or suspend coherently for disappearing +targets and movement restrictions, interrupt affected casts/trades/bank access, +and handle target chains without recursive cycles or iteration-order dependence. +Scene geometry and height/flight behavior require explicit validation. Durable +resource changes still commit immediately; routine follow positions do not +require per-tick database writes. + +## Hardware and connection evidence + +Two owned GPU Chromium/WASM clients used ordinary target clicks and chat +input on the single HTTPS 8443 preview. No native calls or guest-memory writes +were used. The saved runs distinguish these observations: + +- On the unchanged server, `/follow` sends exactly the contract above, produces + optimistic text, and receives no FollowTarget response. Selecting the target + separately sends CharacterAction 105 for information; that is not Follow29. +- A temporary response bridge validates the captured shape and echoes it to + owner and observer. A real world-connection regression first reproduces the + missing response, then verifies the two addressed deliveries and a subsequent + ping. One initial response assertion compared alignment padding to a trimmed + reader result; it is excluded and the corrected assertion passes. +- With that bridge, the follower and its observer visibly follow a leader + walking for four seconds. The follower sends no CharDCMove or CharMouseMove + during automatic movement. Both browser page-error logs remain empty. +- The public control page still reports follower 105 at + `[960.625,16.5,510.625]` after it has followed the leader. A normal W press + cancels following and reports `[951.125,16.375,503.125]`, a 12.1-unit change + that includes the manual key tap. + Thus the bridge demonstrates the native protocol but leaves server position, + range checks and checkpoints stale. It is retained as an experiment and is + not part of the current server. +- The early baseline's short W taps ended with the leader within the native + stopping distance. Those screenshots are not a physical follow-failure test; + the missing response and the later long-walk experiment are separate evidence. + +The bridge source, binary and corrected regression are retained under +`local/player-follow-research/first-response-prototype/` and the research root. +The runtime directories retain the historical label `fixed` for that response +experiment; it does not mean authoritative following is complete. Both owned +players 104/105 were removed after closing their browsers, with all unrelated +database rows preserved. The sole preview was restored to the verified camping +build 218853d. No production FollowTarget handler was enabled by this research. + +## Sources and remaining checks + +Target original KKR SHA256: +`a37bc1c15053fdcc5572772309f7074c4f83baffe2faa164df40b059b7c480c0`. +Original KKR addresses use base 0x10000000; maintained addresses above use +0x36000000. Maintained QQR uses 0x42000000. The evidence consists of maintained +instruction lifts/data initializers and already-retained original records; +no new original-binary analysis session or export was used. + +`local/player-follow-research/request/` preserves complete command/sender/ +constructor/SCFU reader bodies and source hashes. `receiver/findings.md` and +`receiver/movement-followup.md` link complete bodies, registration, IAT, vtable, +RTTI and caller inventories. The matching original records include: + +- Activation: `ev_8bcc339823b969bc5b5e36d6a434f625a11eee1b065ef8dcc4dfa51a8fc5cea5`. +- Steering: `ev_437e76236c9b5d2a0d7dd122ca12b1ff620178cda1d2209666b42e29d1f39ab9`. +- Consumers: `ev_1e75e2365d7f68786685da35877287cd6dc6aba5c507b06902338a1067098cc1`. + +Raw frames, screenshots, GPU descriptions and public control snapshots are in +`local/player-follow-smoke/`. The research verification ledger is +`local/player-follow-research/milestone-verification.json`. + +Completion requires owner/observer/server positions during movement and after +arrival, late observation, manual cancellation versus mouse rotation, target +changes and chains, roots/snares, terrain/flight, death/despawn/zoning/disconnect, +reconnect/cold checkpoints and zero routine database churn. Self/dead/unknown/ +different-zone targets, malformed corrections/waypoints and the distinct +CharacterAction 29 sender need explicit evidence-based policies. The request +shape alone does not establish the historical server's eligibility rules. diff --git a/docs/server-action-coverage.md b/docs/server-action-coverage.md @@ -39,7 +39,7 @@ and response contracts before implementation. | Request | Action | Original producer | Remaining work | | --- | ---: | --- | --- | -| Follow | 29 | 10022240 | Validate target/lifecycle and recover authoritative movement plus native FollowTarget delivery. The request and resulting route use different message families. | +| Exported Follow method | 29 | 10022240 | Establish its actual caller/recipient and response. Ordinary `/follow` directly sends FollowTarget0x260f3671 instead; see [player following](player-follow.md). | | Hide against opponent | 54 | 10022eb0 | Recover concealment/perception contest, eligibility and visibility publication. | | Use skill | 70 | 1002c000 | Identify each actual skill request and its complete effects, feedback and locks. | | Sit on an item | 85 | 1002ba60 | Recover seat identity, occupancy, position and stand/removal/disconnect behavior. | @@ -56,6 +56,14 @@ candidates at this stage. Separate world/statel resources, chat/organization commands and transitive/virtual senders remain outside this bounded request pass. The overall complete-action-set TODO remains open. +The ordinary player `/follow` route is now independently captured and traced. +FollowTarget installs native PlayerVehicle steering for owners and observers; +the follower sends no automatic movement snapshots in the verified long-walk +flow. An echo-only prototype left Go's position frozen; a manual cancellation +packet finally reported a 12.1-unit change. It is retained as research, with +native arrival-force/integration equations, and is not enabled in the server. Authoritative following and the +distinct exported action29 path remain separate unchecked tasks. + ## Camping cancellation Original `N3Msg_StartCamping` at 100278c0 sends CharacterAction 120 with null