commit d6eeb37d331bbdd9987559ff5eb0feea82e9aed8
parent 6b3e7321b45d8a78fc756cce0ec8857ad2fed494
Author: anon <anon@example.com>
Date: Thu, 29 Oct 2026 07:21:42 +0000
Trace native corpse pose and quantify slope occlusion
Diffstat:
3 files changed, 146 insertions(+), 4 deletions(-)
diff --git a/TODO.md b/TODO.md
@@ -3080,10 +3080,16 @@ and server restarts. Turn every reproduced bug into a focused regression test.
establish corpse or actor reentry correctness.
The ordinary Omni boss run instantiated nine native corpses using mesh 25717
and death resource 25721. Some showed only two small mesh portions above a
- slope; backing away exposed clickable portions. Recover the generic death-pose,
- root-motion and terrain placement contract before adding height offsets or
- species exceptions. Retain the open-window expiry case where credits were
- collected but the untaken gloves expired before pickup committed. Evidence:
+ slope; backing away exposed clickable portions. An independent original-clip
+ audit now matches all 32 native Aquaan bone matrices and explains the exposed
+ patches as toes: 510/540 original weighted vertices lie below the sampled
+ terrain. Native use and pickup succeeded despite this burial. Recover the
+ original generic corpse placement / slope-conformance policy; changing the
+ held endpoint or adding species height offsets is not supported by this
+ evidence. See [corpse pose and terrain](docs/corpse-pose.md), including a
+ visible opposite-facing control and successful picking after page reconnect.
+ Retain the open-window expiry case where credits were collected but the
+ untaken gloves expired before pickup committed. Evidence:
[earned creature upgrades](docs/earned-creature-upgrade.md) and
`local/earned-creature-upgrade/`.
- [x] Commit corpse expiry before native removal. Check: unclaimed loot and filled
diff --git a/docs/corpse-loot.md b/docs/corpse-loot.md
@@ -84,6 +84,10 @@ the first variant. Matching a living actor's randomly selected death variant
is not yet implemented. Definitions without a recovered death resource do not
create a corpse.
+Correct animation and skeleton creation do not ensure visibility on slopes.
+The [corpse pose audit](corpse-pose.md) reproduces the original Aquaan geometry
+and measures its burial under terrain; original placement policy remains open.
+
## Contents and pickup
Native right-click use emits `GenericCmdIIR_t` (`0x52526858`). Its body is
diff --git a/docs/corpse-pose.md b/docs/corpse-pose.md
@@ -0,0 +1,132 @@
+# Corpse pose and terrain
+
+The Aquaan remains can be 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 or justify a species height offset.
+The broader [corpse audit](../TODO.md) remains open, including cold replay,
+scene reentry and expiry while a loot window is open.
+
+## 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 |
+
+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.
+
+## Corpse activation
+
+Original `kkr.dll`, SHA-256
+`a37bc1c15053fdcc5572772309f7074c4f83baffe2faa164df40b059b7c480c0`,
+provides the activation and held-animation paths:
+
+- `0x100afcb0` creates the corpse and can copy the nearby original actor's
+ relative position and quaternion when their positions differ by less than
+ one metre. It applies the creation event and hides the original actor.
+- `0x100bd850` dispatches the SimpleItem base-animation branch to `0x10018550`.
+- `0x10018550` obtains the CAT mesh, sets its base animation, sets start to the
+ total duration when requested, sets stop to total duration and starts it.
+
+The corresponding maintained C addresses begin `0x360`, rather than `0x100`.
+The [corpse wire format](corpse-loot.md#creation-animation) 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](omni-training-boss.md).
+
+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.
+
+## Evidence and remaining checks
+
+Local evidence is under `local/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.
+
+Recover or bound the original corpse placement policy before changing shared
+transforms. Extend the facing control to flat ground, warm transitions,
+cold replay and scene reentry. Distinguish a current placement defect from
+behavior inherent in the original clip. Keep the existing animation resources
+and generic skeleton math unless contrary evidence identifies a defect.