aorecomp

Anarchy Online classic in the browser

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


docs/corpse-pose.md (16293B)


Corpse pose and terrain

The Aquaan remains were almost entirely hidden by a slope even when the native corpse, original death animation and skeleton are present and correct. In an ordinary Omni Training kill, 510 of the original mesh's 540 vertices lay below the reconstructed terrain. The 30 exposed vertices belonged to its two toe groups. Native right-clicking one of these patches opened the loot window; credits and its pistol transferred successfully.

This diagnoses the captured rendering problem. It does not establish the original server's corpse placement policy. The broader historical corpse audit remains open.

Current placement rule

The server uses a provisional geometric correction for six independently validated held poses: Leet, Aquaan, Android, Clawfinger, the training Functionary and mercenaries. tools/data/extract_corpse_poses.py reconstructs their final skinned vertices from the original mesh and animation; server/gamedata/corpse_poses.yaml retains the distinct vertices and input payload hashes. These vertices match the previously native-validated poses to the stored six decimal places. The other creature bodies retain their existing placement until their pose extraction is validated.

At death, server/corpse_placement.go samples the existing terrain triangles under each transformed held-pose vertex. It raises the anchor only as far as needed for those vertices to clear the terrain by 1 cm. Horizontal position, facing and original animation remain unchanged. This is a shared geometry rule, not a recovered original server formula. It tests vertices, not every interior point of a mesh triangle, and does not conform the horizontal body to a slope. It leaves indoor corpses and already clear poses unchanged.

The corrected anchor commits atomically with death, loot and rewards. Before publishing a corrected corpse, the server removes its original actor, so native warm activation cannot copy that actor's lower position back onto the corpse. The recorded Aquaan case moves from Y=13.912122 to approximately Y=15.081813. The focused transaction regression covers flat ground, cold load, rejected and ignored writes, commit failure, and retry without publishing a premature corpse.

TestBrowserAquaanCorpseSlope reproduces the recorded pose with one remaining HP and uses native mouse selection and attack input. The corrected body is recognizable, its torso opens loot before and after reconnect, and its five fixture credits transfer once and survive cold load. A separate retained opposite-facing pose requires only about 0.207 m of correction; its native living actor is within the one-metre copy threshold. The corrected native height survives both warm activation and reconnect. This second case checks pose replacement, not another loot interaction. These are controlled fixtures, not earned-progression evidence.

A controlled native experiment also tested terrain tilt. On replay, the client changed the transmitted quaternion (0.177903,-0.902129,0.167705,0.355513) to (0,-0.939406,0,0.342806), leaving only the toes exposed. This confirms that a server quaternion adjustment alone does not fix this case. Evidence is retained under local/alpha-corpse-slope/20261105-142426/.

Original resources

The inputs are the shipped 14.9.1 ResourceDatabase.dat, SHA-256 ad8afec23058db02af75b9f5d614ef6ebe3e93cc817bd626955f18a372e13741, and original bbr.dll, SHA-256 28f196f650edbb1573fb874ccaf7746453d3e4a183e1d86db1d790c1c32ecc2c.

Creature MonsterData Mesh Death resource Duration
Leet 17655 15222 18107 1666 ms
Aquaan 30369 25717 25721 2333 ms
Android 17649 15215 17340 3000 ms
Clawfinger 38387 38188 29979 1666 ms
Functionary 26147 17905 15621 3833 ms
Mercenary 26088 17534 15621 3833 ms

The compressed animation loader is bbr.dll sub_251176C0 in the maintained relocated C, with translation/quaternion sampling in sub_25118180 and sub_251180A0. The streams were independently decoded, consuming every byte. The Aquaan's named root, bone 1 Bip01_ac, moves from approximately (-0.000766, 1.058260, -0.233579) to (-0.000766, 0.104874, -1.682153) in model space. Its translation and quaternion are already identical at 1666, 1700 and 2333 ms. Selecting an earlier held frame within that interval cannot change this root pose.

Unchanged C samplers reproduced the final translation and quaternion for all 26 Leet and 32 Aquaan bones within 1e-6, preserving guest stack and FPU state. The unchanged C CATRender::BuildSkeleton / recursive skeleton implementation also matched independent clip and hierarchy composition within 2.405e-7. These checks exercise nonempty clips; client/tests/animation_transform.c uses an empty animation list and tests a different contract.

Neutral Android correction (November 5)

The original Neutral training Android at [98.22058, 4.3194237, 107.11992] reproduced a buried torso in the controlled corpse check. An unobstructed view showed only its hands and feet above ground; successful native pickup alone did not satisfy visible placement. Adding its 827 distinct held-pose vertices to the shared correction makes the whole fallen robot recognizable. The regression reaches death through the combat handler and verifies unchanged horizontal position/facing and the raised anchor after database recovery.

The retained original C samplers match the final translation and quaternion of all 40 Android bones within 1e-6, with preserved stack/FPU state. The original skeleton calculation matches independent composition within 1.792e-7. The sampler and skeleton checks are under local/alpha-neutral-fauna/; inputs and hashes are retained with the generated pose data. Native evidence is under local/alpha-training-corpses/20261105-151222/954/district/0/group/0/authored_point/. The visible corpse yields the exact QL3 Robot Junk instance and one credit, retained through reconnect and a fresh database load. This controlled check starts with a fresh corpse; it does not establish an ordinary kill pace or repeat the shared warm-activation checks above.

Clawfinger subsequently reproduced the same buried-body failure at [90.388504, 5.5916004, 144.4074], after normal surface settling of its elevated spread spawn. The earlier fixture killed that spawn before initializing its surface geometry, creating an unreachable floating corpse; this fixture error is separate from the grounded corpse's exposed-foot-only rendering. Its 460 distinct held-pose vertices now use the same correction. All 36 bones match the original final samplers within 1e-6; original skeleton composition agrees within 1.195e-7. The grounded pre-fix capture is local/alpha-training-corpses/20261105-151749/954/district/0/group/2/spread_authored_point/. The corrected native run at 20261105-152058 shows the full body at Y=6.171181, passes native loot pickup/reconnect, and retains exact ownership after database recovery. The Android final fixture at 20261105-152014 passes the same checks with its corrected Y=5.7780766. Both use the existing shared rule; no species-specific placement handler was added.

Training human correction (November 5)

Native kills of the Functionary at [65.821846, 16.346714, 175.79474] and Clan mercenary at [155.22652, 11.569292, 184.89328] reproduced buried bodies. Each body now contributes 408 distinct held-pose vertices to the same clearance rule. Their shared male death clip matches all 32 original bone samplers within 1e-6; original skeleton composition agrees within 1.3e-7 for both bodies. The regression checks death through the combat handler, unchanged horizontal placement/facing and persistence of the raised anchor after database recovery.

The Solitus thin mesh begins with an empty selection group. The extractor now consumes the two zero fields between groups instead of mistaking them for another group header. This also correctly traverses the Aquaan's empty groups; its extracted vertices and the other three retained creature poses are unchanged. Nonzero inter-group fields remain unsupported. Human poses cover the body mesh; the separately attached head is not part of these clearance samples.

Sampler/skeleton comparisons and resource-layout checks are retained under local/alpha-human-opponents/. The human encounter verification records native warm activation, reconnect and exact loot ownership checks.

Corpse activation

Original kkr.dll, SHA-256 a37bc1c15053fdcc5572772309f7074c4f83baffe2faa164df40b059b7c480c0, provides the activation and held-animation paths:

The corresponding maintained C addresses begin 0x360, rather than 0x100. The corpse wire format selects this held base-animation branch. No terrain correction is established by these functions; that is not proof that every original placement path lacks one.

Native slope capture

The owner used ordinary keyboard and mouse controls against the existing HTTPS preview, with headless Chromium rendering through the GPU. No packet injection, GM grants, forced loot rolls or enemy edits were used. The character defeated the full-health, 150-HP training boss, earning 150 XP, four corpse credits and a QL 5 pistol. Its Aquaan mapping and reward profile remain provisional as described in the boss evidence.

For corpse 51050:1068725, the original actor and held corpse retained the same world transform. The frame position was (186, 13.912122, 174.375), quaternion (0, -0.930363, 0, 0.366640), with unit world scale and a clean matrix cache. The clip's start, stop, effective time and sampler time all held at 2333 ms. Every captured bone matrix matched independent original clip and hierarchy composition within 2.384e-7.

Applying those matrices to the original 540 weighted vertices gave:

Measurement Result
Body world X bounds 186.065589 to 187.815274
Body world Y bounds 13.835640 to 14.282625
Body world Z bounds 174.627377 to 176.102864
Terrain height under sampled vertices 14.046031 to 15.102004
Vertex clearance above terrain -1.159691 to +0.140548 m
Vertices below terrain 510 / 540
Exposed right / left toe vertices 17 / 13

The terrain comparison uses the alternating triangle planes in server/terrain.go over server/assets/terrain.bin, rather than a smoothed height approximation. Counts at triangle vertices do not establish the sign at every interior point when geometry crosses terrain cells. Backing away changed the camera view but left the measured corpse geometry unchanged.

An opposite-facing control used another full-health boss life, approached from uphill through ordinary movement. Corpse 51050:1068726 held the same original bone pose, again matching within 2.384e-7, at (190.5, 15.437122, 179.5). Its body fell across lower ground and was clearly visible. Only 95/540 vertices were below the sampled surface, with clearances from -0.196855 to +0.433620 m. This provides a positive rendering control for the same mesh, clip, client and production server. The different death position and facing both contribute; this is not an experiment varying rotation alone.

A page reload replayed this second corpse without its original actor. Its bone pose still matched within 2.384e-7, and native picking opened its loot window and collected two credits. Its frame now used the server's position (190.550903, 15.636542, 179.514938), rather than the nearby actor transform copied during warm activation. At this higher anchor only one vertex lay below the sampled terrain. This is page reconnect evidence, not a server restart or proof of the general corpse placement policy.

Both picked-up pistols, QL 5 and QL 3, remained in native inventory after another page reload and matched their SQLite item IDs, quality, charges and slots. All 26 pre-existing physical items remained owned with unchanged slots and quality; the laboratory's only change was two consumed treatment charges. The two kills added 300 cumulative XP and six collected corpse credits. This does not extend the result to a server restart or concurrent looters.

Original generic placement and orientation

The original corpse vtable at KKR 10174a68, slot +0x24, selects generic activation 100b25c0 (client/game/kkr.dll/lifted-0053.c, sub_360B25C0). It enables ground collision unless flag 0x20000000 is set, calls the outdoor surface's VetoPosition, then adds the corpse with its position/quaternion. Original LLR n3TilemapSurface_t::VetoPosition at 1003cb70 clamps world bounds, including Y in [0,2000). It does not sample terrain height or normals.

The corpse construction path uses Chest_t and the generic n3Dynel_t::CreateVehicle at LLR 10017c70, which creates DummyVehicle_t. Its base constructor sets orientation mode zero. Original QQR Vehicle_t::CalculateOrientation at 10014290 explicitly uses world up and horizontal forward in that mode; mode one separately uses a surface normal. DummyVehicle_t::UseSurfaceNormal at 10014310 selects mode one, but the traced corpse construction/activation does not request it. The maintained orientation counterpart is client/game/qqr.dll/lifted-0006.c, sub_42014290.

Initial UpdateWhere/SetRelPosRot still performs generic ground reconciliation. Ground collision does not establish conformance of the fallen mesh to a slope. This static path supports no automatic corpse slope rotation; it does not recover the original server's transmitted anchors or exclude other stat-driven paths. No placement or species-offset change follows from this result.

Complete original records are retained in local/old/corpse-pose/placement-policy-kkr.json, placement-policy-llr.json and placement-policy-qqr.json. Key evidence IDs are ev_50825da2fb9e31173ee2759da39987c2cd1bbb91335fe18adf5d8ae995009504 (activation), ev_2cc559dcb59f5b169544c67cef142c9ae4b0a84dbbfbc02b760682e25420b75c (bounds), and ev_e6799df91d32f2b0e717dab9bf0d8764e5a2910cbff674479c3a1a8a8c14b53e (orientation).

Evidence and remaining checks

Original evidence is under local/old/corpse-pose/: original resource bytes and offsets, hashes, decoded tracks and geometry, independent composition, unchanged C sampler/skeleton harnesses, original KKR provider evidence, native screenshots, packet captures and read-only heap samples. data/runtime-layout.json records the exact guest pointers and structure offsets. Cached world matrices must be read with their dirty flag; invoking a matrix getter can update the cache. Current controlled captures and regression logs are under local/alpha-corpse-slope/.

Exact original placement fidelity remains deferred. Extend pose extraction only when another reproduced corpse failure requires it, and validate the decoded pose against the original sampler before enabling its correction. Keep the existing animation resources and generic skeleton math unless contrary evidence identifies a defect.

The public MMSys2012 server trace cannot establish corpse anchors. Its first64KiB contains931 complete records with no TCP payload bytes; the authors' paper, section3, explicitly describes headers-only recording. This is Petlund, Halvorsen, Hansen, Lindgren, Casais and Griwodz, Network Traffic from Anarchy Online: Analysis, Statistics and Applications, MMSys2012, pp95-100. The bounded sample, source headers, TShark results and limitations are retained in local/corpse-placement-research/. No original placement rule follows from the transport lengths alone.