AO14.9.1 stationary mouse rotation protocol
Result
CharMouseMoveIIR_t key0x25327751 has a47-byte compact subclass. Native14.9.1 has a13-byte IIR prefix (threeDWORDs and one pass-on byte), for60 bytes total. The project normalizes that prefix to16 bytes, giving63 bytes in its handlers. It is a distinct message from CharDCMoveIIR_t. The base compact pose format is shared, but CharMouseMove adds eight floats. Native clients apply its pose with action20; translation need not be simulated for a stationary turn. The original opcode/subclass can be relayed directly to observers after authoritative validation and in-memory pose update.
This investigation used shipped code only. Parent owns the two-client WASM replay/capture and should record its result separately. No production edits.
Exact wire layout
All multibyte fields are big endian. The table uses PROJECT-NORMALIZED body offsets, not the outer N3 transport packet. Normalized body length is63 bytes. Native14.9.1 uses just one byte at offset12 for pass-on; subtract3 from every table offset16 and later. Its body is60 bytes, with action at13, X14, Y16, Z18, XYZW20/22/24/26, and extra groups28/44. This distinction is implemented in server/target_protocol.go's common framing conversion.
| Offset | Size | Field | Native decoding |
|---|---|---|---|
| 0 | 4 | Message key | 0x25327751 |
| 4 | 4 | Subject type | Player50000 in sender path |
| 8 | 4 | Subject instance | Sending character ID |
| 12 | 4 | Normalized pass-on flag | Native field is1byte; observer reply clears it |
| 16 | 1 | Action/control | low7bits action; highbit local correction flag |
| 17 | 2 | X | unsigned16 *0.125 |
| 19 | 2 | Y | signed16 *0.0625 |
| 21 | 2 | Z | unsigned16 *0.125 |
| 23 | 2 | Quaternion X | signed16 /16384 |
| 25 | 2 | Quaternion Y | signed16 /16384 |
| 27 | 2 | Quaternion Z | signed16 /16384 |
| 29 | 2 | Quaternion W | signed16 /16384 |
| 31 | 16 | Extra four floats A | Written from rotation helper+0x20 |
| 47 | 16 | Extra four floats B | Written from rotation helper+0x30 |
The reader normalizes the decoded XYZW quaternion and checks its components and position with _finite. Compact writer multiplies X/Z by8, Y by16, XYZW by16384 and converts to short via ftol. Eight trailing floats are stored and serialized unchanged. No explicit timestamp, sequence number, linear speed, or angular speed scalar appears in this wire layout.
The extra groups have quaternion-shaped four-float storage, initialized to (0,0,0,1) each by rotation helper constructor0x10049ec0. The inspected sender copies those groups into the packet. They are not read by client activation. Their original server-side purpose remains unknown; preserve them on relay, do not assign speculative speed/time meanings.
Sender and cadence
n3EngineClientAnarchy::N3Msg_MouseMovement0x10020520 routes through vehicle wrapper0x1004bd30 to helper0x10049f10. For nonzero horizontal motion it reads the vehicle body quaternion, applies horizontal delta*12 radians, normalizes it, and immediately sets the actor's local rotation. The flying branch also uses vertical motion. First-person camera pitch is handled separately.
The helper creates CharMouseMove with action20, current position and updated rotation when there is nonzero mouse input or its pass-on decision permits a sample. It copies its extra two four-float groups as above.
The final constructor byte at object+0x68 is an internal pass-on eligibility flag, not a wire field. The ordinary sender derives it from0x1004a950, which uses a timer and smoothed angular-motion thresholds; its timer condition is greater than1second, with absolute-rate thresholds0.02 and0.2 and a direction change flag. Thus local motion processing does not imply a network packet per rendered frame. Exact packet cadence should be verified in capture.
EndMouseMovement0x10020640 calls wrapper0x1004bd50 ->0x1004a540. This emits another action20 message with current position/rotation and internal pass-on eligibility1. It does not emit a different turn-stop action.
Native reception and observer echo
Common activation0x10043c50 resolves the full subject identity. A missing dynel clears pass-on and returns. A received ordinary message for the local actor is ignored when pass-on is0 and action highbit is0. This protects the locally controlled actor from its own ordinary observer update.
For a locally generated message with pass-on true, the helper overwrites its base pose with the actor's actual current relative position and rotation and updates the local motion timestamp. That timestamp is local bookkeeping and is not serialized here.
For an observer message (pass-on0, actor differs from local actor), common activation updates reconcile position and calls SetRelPosRot using decoded pose. CharMouseMove activation0x10047350 then handles action20 by calling actor virtual+0x84 with position/rotation and two zero arguments, and forwards control20 into the vehicle movement state through0x10049130. It does not consume either extra float group. The exact name of virtual+0x84 was not resolved; the explicit arguments and subsequent control call are observed.
Action highbit1 with the local actor takes a correction branch: update reconcile/last-allowed position and SetRelPos, then return without the normal rotation activation. This is distinct from an ordinary rotation reply and should not be introduced into observer relay or trusted from a client merely because it shares the compact byte.
Minimal server approach and validation
These are reconstruction recommendations derived from the observed protocol, not a recovered original server implementation:
- After project prefix normalization, accept exact63-byte body, opcode0x25327751, subject50000 and session-owned ID.
- The original inspected sender emits action20 with the correction bit clear. Validate that control for the supported mouse-rotation path.
- Decode the compact pose using the exact signedness/scales above. Reject a zero quaternion before normalization. Apply existing movement/position bounds validation to the position, since mouse rotation can occur during movement as well as while stationary.
- Check trailing floats are finite, but do not require speculative meanings or enforce invented speed/rate fields. Preserve them for native relay.
- Store the accepted pose in memory with periodic persistence, using the same low-significance state cadence as other movement. Avoid changing translation input/walk/run controls merely because rotation arrived.
- Relay the original opcode/subclass to other observers in the playfield, with subject identity intact and IIR pass-on0. No ordinary owner echo is necessary for the inspected native branch.
Focused automated coverage should include the body length, spoofed subject, wrong control/correction bit, signed negativeY, quaternion normalization and zero rejection, NaN/Inf in trailing floats, stationary pose update, observer relay with pass-on0, and reconnect checkpointed facing. Manual two-client testing should compare rotation while stationary, while walking, and final RMB release. Camera-only turning should not be mistaken for body turning.
Evidence ledger
Artifact: anarchy-vanilla-14.9.1/kkr.dll SHA256: a37bc1c15053fdcc5572772309f7074c4f83baffe2faa164df40b059b7c480c0 Native base0x10000000; translated guest base0x36000000.
- native-batch1.json, ev_07887b48bc8cfd3e54e4bac7ea7c45ecd9c3d338403ff202eee803de9cbe194d: named constructor0x10047200, activation0x10047350, reader0x100473f0, writer0x10047460, compact reader0x10043dc0/writer0x10044010, common activation0x10043c50, final sender0x1004a540.
- native-batch2.json, ev_b7fca2382c4a0f424443dba477896a201d711b7d9bad3fc6d08c0d45b9cb05b8: pass-on helper0x10043c10, correction helper0x10043c20, sender0x10049f10, smoothing0x1004a630, pass-on timing0x1004a950, control0x10049130, MouseMovement0x10020520, EndMouseMovement0x10020640. Selector0x1015f9ca is an import thunk and failed procedure resolution; its objdump import target0x1016ffc8 is ToBePassedOn, not an unresolved new protocol function. No conclusions depend on its missing pseudocode.
- native-batch3.json, ev_c35c499f92e5775efa92556dcc362bf2c3ae8338c783874f5807689916c89d0c: extra-state initialization0x10049ec0, movement wrappers0x1004bd30/50, timer reset0x1004aa30, named registration0x10015ab0.
- writer-assembly.json, ev_9dd5320f046074fdc01aad5915617782f77952b1d3ea2ca292c6ad271ade01a6: exact compact writer scale multiplications lost in ftol pseudocode.
- compact-scales.json, ev_126d3aef977e97eadce0bbd7fbeb50b6b758bdd0d7a3a8ed088ed2e1f86c2501: constants at0x10170b94..a8 =1/16384,1/16,1/8,16384,16,8.
- evidence.json exports the owned REA session; session closed after research.
Native class registration and constructor tie this wire subclass to the exact CharMouseMoveIIR_t name. The16-byte prefix described earlier in docs/protocol.md belongs to the shared project representation; target_protocol.go explicitly documents recovered14.9.1 byte pass-on/no compressionDWORD framing, citing LLR Construct0x100240b0. The initial research report mixed these levels; this ledger now distinguishes them.
Read-only body-facing probe
Vehicle::GetBodyRot in QQR native0x10011250 (guest0x42011250) is exactly
return this+0x7c. Read four XYZW floats at vehicle+0x7c/+0x80/+0x84/+0x88,
where vehicle is read(actorDynel+0x60). This is the body quaternion used by
the native mouse-rotation sender, independent of camera-only rotation.
LLR n3Dynel::GetRelRot native0x10017f60 (guest0x38017f60) loads dynel+0x60, calls that GetBodyRot and copies four floats into its return value. Vehicle::GetGlobalRot native0x10011220 checks vehicle+0x28: when zero it returns GetBodyRot; when nonzero it returns the cached quaternion at+0xf4. This gives world-facing orientation when a vehicle has a parent.
Source-only follow-up, no new REA session:
- client/game/qqr.dll/lifted-0006.c:52, exact body getter.
- Same file:8, global getter and parent condition.
- client/game/llr.dll/lifted-0008.c:4135, dynel relative getter.
- Native export tables saved as qqr-exports.txt/llr-exports.txt; objdump disassembly confirms the offset loads and four-component copy.
- QQR SHA256: c011e411b9cecfbde03c4b37fc988540a1246fafc9921c7cab7cb9ef2bb8d913.
- LLR SHA256: ebb09047f6ead192388f7ddfb4795da5013a60f7c2d1c3933ec02eef58a10132.
Project internal encoding choice
An internal64-byte subclass (u32 action, XYZ12bytes, XYZW16bytes, extras32bytes) is a defensible project representation if targetPacket compacts the initial 32bytes to15 and preserves the32-byte tail. It is not the native14.9.1 wire format, and this investigation does not establish it as an earlier client's contract. Backward compatibility is not required.
The existing targetPacket switch compacts0x54111123 only. A project-normalized 16-byte IIR prefix plus the original compact47-byte CharMouseMove subclass can therefore keep its payload intact through that common framing conversion, which removes three prefix bytes for native14.9.1. This avoids a new float re-encoding pass. It still uses normal transport framing; forwarding a whole raw native packet through a shared-packet API would apply framing twice. Either representation can be correct; tests must verify the resulting native13+47-byte IIR and preservation of the extra32bytes.