aorecomp

Anarchy Online classic in the browser

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


commit 0a525107796dd9d9c9e4df961b349ce07daad8e0
parent 93b79520c60771c914aedf087de07478c17b7eb6
Author: anon <anon@example.com>
Date:   Wed,  4 Nov 2026 17:31:48 +0000

Verify original player combat-turn movement gates

Diffstat:
MTODO.md | 8++++++--
Mdocs/combat-facing.md | 43+++++++++++++++++++++++++++++++++++++++++--
Mtools/client/test_combat_facing.mjs | 33++++++++++++++++++++++++++++++++-
3 files changed, 79 insertions(+), 5 deletions(-)

diff --git a/TODO.md b/TODO.md @@ -3840,8 +3840,12 @@ with payloads and known client/server provenance. publication regression leaves authoritative combat-turn policy open; see [combat facing](docs/combat-facing.md). A further original QQR check confirms that the turning setter redirects - longitudinal velocity. Concrete player-vehicle eligibility and authoritative - replication remain gaps; the bounded evidence is retained in that document. + longitudinal velocity. The original default PlayerVehicle/status bridge is + now recovered: active forward/lateral/vertical inputs or flying mode block + auto-turn. A short two-client forward/release regression verifies that boundary + without adding movement publication. Alternate helpers, moving-target retiming, + interruption/casting and authoritative replication remain open; the bounded + evidence is retained in that document. - [x] Keep browser rebuilds independent of reviewed server-world data. `make wasm` previously recopied ignored extraction output through its `assets` prerequisite, removing reviewed destination/arrival/requirement rows from `zone_links.yaml`. diff --git a/docs/combat-facing.md b/docs/combat-facing.md @@ -82,5 +82,44 @@ This does not identify the concrete player override or establish when moving players may auto-turn. The generic DummyVehicle construction/table does not resolve those player-specific calls. Retained `gate-*-evidence*.json` and matching snapshots under `local/combat-facing-research/` bound this pass. -Concrete player-vehicle gates and original server replication remain gaps; -no forced client packet or guessed authoritative turn was added. +The default player-vehicle gates are now recovered below. Other status helpers +and original server replication remain gaps; no forced client packet or guessed +authoritative turn was added. + +## Default player-vehicle movement gates + +Original KKR RTTI binds primary vtable10170fe8 to PlayerVehicle_t through +CompleteObjectLocator1017b310 and type descriptor101c1a18. Constructor1004b8a0 +installs that table. Its slot+0x8c is10049150; the wrapper gets the active +CharMovementStatus_t at vehicle+0x158, invokes its slot+0x1c and normalizes the +result to boolean. Ghidra does not identify10049150 as a procedure; retained +original bytes, the table and the recognized getter establish this small bridge. +The source-bound records are in `local/combat-facing-research/gate-followup-evidence.json`. + +CharVehicle constructor100476e0 creates the default status through100445d0, +whose vtable10170bdc selects100497a0 for that predicate. The four tests are +status DWORDs at+8 ==3, +0x10 ==3, +0x20 ==5 or+4 ==7. These map to the existing +server `playerMovement.blocksSit` component checks1/3/7/0. They describe active +forward/lateral/vertical controls or flying mode, not a generic nonzero-velocity +test. Fight update skips its turn request when the predicate is true. + +Slot+0x90 is10049170: vehicle byte+0x144 must be nonzero and the status's vertical +DWORD at+0x20 must equal5. That condition is already covered by the first gate +for the default status. This does not establish every alternate status helper. +Key records are `ev_801b411aac82a820a679568498b0d2ebcd514e456088ca731b235c5843391dce` +(constructor), `ev_e343e46043884c6d256a9760d85f2d5ec89e66ce7fa3468b5b86dd0990bf88b6` +(slot), `ev_d37c4fd499a21252825890ddc76c32a58eb272f1ae5a517b6cd900847ebae7ad` +(wrapper bytes), and `ev_a48171b085d96a2b6711e8158bf09eea1f5c25c5e019b7506ae43cf94d4b585b` +(status predicate). + +The extended native regression preserves the stationary publication check, then +uses ordinary A input to align north. Real W and Q input moves both replicas +over four metres while they retain that heading. After the observed action2 +forward-stop request, both auto-turn without another movement request. Target +HP stays100, and real Q stops the held encounter. The accepted23.60-second run +is `local/combat-facing-research/20261104-092801/`; its independent audit is in +`local/combat-facing-research/gate-followup/`. This is controlled geometry and +input, without attacks, rewards, level earning or farming. Authoritative turn +phase, moving-target retiming, interruption/casting and original server +replication remain open; this resolves a prerequisite rather than fixing the +reported server heading. diff --git a/tools/client/test_combat_facing.mjs b/tools/client/test_combat_facing.mjs @@ -66,8 +66,39 @@ try { evidence.manual = await capture(); assert(angle(evidence.manual.server.rotation, evidence.initial.server.rotation) > 2.5); assert(angle(evidence.manual.server.rotation, evidence.manual.clients[0].rotation) < 0.03); + + // The concrete PlayerVehicle gate suppresses auto-turn during forward input. + await owner.hold('KeyA', 'ordinary turn restores the original north heading', () => + angle(actor(owner).rotation, evidence.initial.server.rotation) < 0.05); + evidence.aligned = await capture(); + const movingAttack = owner.sequence; + let released; + await owner.page.keyboard.down('KeyW'); + try { + await owner.key('KeyQ'); + await owner.wait('real moving attack request', () => owner.events.some(event => event.sequence > movingAttack && + event.direction === 'framesent' && event.opcode === '28494070')); + await Promise.all(games.map(game => game.wait('forward input remains active through a combat-turn check', () => + actor(game).combatTarget === target && actor(game).position[2] > evidence.aligned.clients[0].position[2] + 4))); + evidence.forward = await capture(); + assert(evidence.forward.clients.every(client => angle(client.rotation, evidence.aligned.clients[0].rotation) < 0.1)); + } finally { + const stop = owner.sequence; + await owner.page.keyboard.up('KeyW'); + await owner.wait('real forward release is published', () => owner.events.some(event => event.sequence > stop && + event.direction === 'framesent' && event.opcode === '54111123' && Buffer.from(event.hex, 'hex')[29] === 2)); + released = owner.sequence; + } + evidence.released = await capture(); + await Promise.all(games.map(game => game.wait('releasing forward permits original combat auto-turn', () => + actor(game).combatTarget === target && angle(actor(game).rotation, evidence.aligned.clients[0].rotation) > 3))); + evidence.forwardTurned = await capture(); + assert.equal(evidence.forwardTurned.server.targetHealth, 100); + assert(!owner.events.some(event => event.sequence > released && event.direction === 'framesent' && event.opcode === '54111123')); + await owner.key('KeyQ'); + await Promise.all(games.map(game => game.wait('second real stop ends the held encounter', () => actor(game).combatTarget === 0))); assert(games.every(game => game.errors.length === 0)); - console.log('PASS: native auto-turn changes both visible owners without movement publication; ordinary input publishes the retained facing'); + console.log('PASS: native auto-turn publishes no movement; active forward input blocks it and release permits it on both replicas'); } finally { try { await fs.mkdir(output, {recursive: true});