Compose source body physics and enable tutorial static response

This commit is contained in:
UnixNight committed 2026-10-26 22:22:42 -04:00
1 parent df0263b26e
commit 35a2a66606
26 files changed
+1045 -18

No files matched your search

@@ -0,0 +1,171 @@
# Ordinary body composition479D20
2026-10-27 UTC. Independent source investigation for the managed composition
chunk. The EXE SHA256 is
`f5281076e1a2492f2d61f87aae3f4544b6d0f535ebe33f9fbb6f78710fe1aea8`.
Preferred VAs below are PE-mapped by body_composition_contract.py; text raw
offsets equal VA−400000 for these supplied bytes. The helper guards the entire
479D20..47A329 body plus81 decisive instruction sites and12 Jimmy vtable targets.
## Evidence and scope
Retained REA479D20 Evidence
`ev_5439072b32ae9f9208795ad2b07bc524e2407b46da487072fb3dfd8c10e7c4b0`
is in artifacts/collision-response/rea-response/01.evidence.json. Its incomplete
prototype/local-variable reconstruction must be checked against instructions;
the actual caller supplies actor interface and dt. Reviewed disassembly is saved
to artifacts/collision-integration/body-composition.instructions.txt; fixed source
anchors/offsets are in body-composition-contract.json. No original executable
entry point or original routine was executed in this independent investigation.
The ten prior copied-code body observations remain separate in
[collision-body-probe.md](collision-body-probe.md).
Focused new REA/Ghidra session used the existing generated EXE copy, exported
Evidence, then closed normally under artifacts/collision-integration/rea-body-radius/:
| Procedure | REA Evidence |
|---|---|
|471240, authored/current radius setter|ev_d77d8a0d308e4d9b71dbb0cccfcf68771bd4552a9d4a09c50d14225ec171b058|
|471B40, live body-radius setter|ev_97d21014bcdac4f44484c1c079e957f22d449b60efd7c2a31be450deddc38871|
437F90 was not recognized as a Ghidra procedure; the complete error remains in
00.json. Its burst call site is supported by reviewed instructions/fixed guards,
not attributed to successful pseudocode. No unchanged failed query was retried.
## Recovered phase order
The body pointer is the game interface, complete-object+C0 for Jimmy. Slot offsets
in this report are interface-relative.
| VA / raw offset | Source operation and ownership |
|---|---|
|479D2E /79D2E|Read support218 and cache previous support in global695D49.|
|479D3D..4E /79D3D|If support handling1C8 is enabled, write current support21C(false).|
|479D58..60 /79D58|Only now test integration210; false returns with the preceding support side effects intact.|
|479D6F..479DD4 /79D6F|Read current root310 and old previous root2F8; compute quick magnitude of their difference and discard its result. This is not a pre-support/gravity cancellation query.|
|479DDA..479E54 /79DDA|Test global geometry4F69E5, independently of prior support. Enabled: anchor2F4(0,−25000,0). Disabled: support21C(true), anchor(0,current-root-Y,0), acceleration278(0,−gravity.Y,0), velocity2C4(oldX,0,oldZ).|
|479E63..479EAC /79E63|Read angular velocity2AC, rotate334(angularXYZ×dt) before consuming impulse.|
|479EBB..479EF2 /79EBB|Read pending impulse284, add XYZ through velocity2CC, clear impulse28C(0,0,0) once.|
|479F01..479F4A /79F01|Read acceleration270, add accelerationXYZ×dt to velocity.|
|479F50..479F7E /79F50|Separately add global gravityXYZ×dt.|
|479F8D..479FD2 /79F8D|Read resulting velocity; store displacementXYZ=velocityXYZ×dt.|
|479FD6..479FF0 /79FD6|Read collision flag220, then world-response1D0 when collision is enabled. These gates are distinct from global geometry and support.|
|47A038..47A096 /7A038|World branch clears last polygon695D4C, sets face695D5C=130000 and edge5CFBE0=radius260, copies current root into previous-root2FC, clears auxiliary695D84.|
|47A090..47A11F /7A090|If displacement.Y>0, dispatch47B4B0 with fullXYZ. If Y<=0, dispatch with XZ/zeroY, then add original falling displacement.Y to candidate.Y. Edges flag is true in both paths.|
|47A123..47A181 /7A123|After terminal contact callback, read fresh previous-root2F8 and live root310 and compare all four floats. Only equality permits final candidate publication.|
|47A187..47A1C4 /7A187|Clamp candidate **Y** below−25000 to−25000, then publish Vec4 via314; if any previous/live component differs, skip clamp/publication.|
|47A22A..47A235 /7A22A|If1C8, run support47B890 after displacement/callback/publication. It uses the original previous support695D49 for landing transition.|
|47A241..47A25A /7A241|Read published scalar268/live160. Equal zero invokes friction47A330; this is not controller scalar608 or a raw-control test.|
|47A298..47A2D1 /7A298|Read suppression scale230/live144. Angular quick magnitude×scale<=0.1 zeros angular velocity2B4.|
|47A2E0..47A31D /7A2E0|Linear quick magnitude×scale<=0.1 plus a fresh268==0 zeros linear velocity2C4.|
Publication from the dispatcher means writing the caller's candidate stack vector,
not necessarily changing actor root310. The later Vec4 equality check preserves
contact-owned transform changes. It compares freshly read previous/live roots;
it is not a comparison with a stale local copy and must include W. Ordinary
370 and nonspecial Jimmy374 do not move the root, so a bounded ordinary adapter
can keep W=1 explicitly. A future special callback must preserve this boundary.
The body does not automatically reset movement mode/jump/fire on support. Source
landing37C for Jimmy is a no-op; later controller/fire callbacks own those states.
Landing observer order and friction details are in
[collision-contact-callbacks.md](collision-contact-callbacks.md).
The rotate334 call's order and XYZ arguments are recovered here; this does not
recover generic334 angle wrapping or logical/render transform synchronization.
The original body fixture substitutes a simple Euler-add virtual, so its angular
cases cannot independently prove the real transform implementation. An ordinary
live bridge supplying zero angular velocity remains within a narrower contract.
## Flag branches and shared state
If220 is true but1D0 is false, source47A1CC..47A220 copies current root to
previous2FC and translates31C(displacement). Support and published-speed friction
still run afterward. It does not initialize/query the static context in this path.
If220 is false,47A264 tests228. When228 is false, it translates31C(displacement);
when true it does not translate. Both skip support and friction, but still run
the suppression tail. The initial support clear remains, if1C8 was enabled.
Treating all of these modes as a single collision/noclip boolean would lose
source state changes. Modern F3 noclip is a separate user-requested policy.
Prior source guards establish ordinary defaults: support1C8/live13B=true,
world1D0/live13C=true, integration210/live13E=true, collision220/live140=true,
228/live141=false. Player overrides prevent-lowering208/live13A=true; direct
dispatcher member42C defaults0. Generic suppression-scale default0.5 is
46FE01→471120→234, and Player friction default0.8 is4373B0→4711B0→24C→live150.
These are initialization contracts, not invariants after authored/script setters.
Static context resets occur once before body world traversal. Retries retain
nearest/last polygon. Dynamic response uses its own face/edge initialization and
can retain the last-polygon global; it remains a separate shared-scene contract.
No new meaning is assigned to auxiliary695D84 in this bounded investigation.
## Init restores authored speed separately from current publication
Retained REA470540 Evidence
`ev_c16f95e608194a8f9fb029430f1c6a01512d34099ebf447cf944946c79631166`
in artifacts/collision-integration/rea-support/02.json covers generic Init's scalar
copy. It is independently linked to Jimmy's vtable and the guarded leaf bodies:
| Source site | Initialization contract |
|---|---|
|4706CF /706CF|Calls Jimmy interface114→471260, reads authored float interface38.|
|4706DB /706DB|Passes that value to interface26C→471B60, writes current published160.|
|46FC08 /6FC08|Constructor zeroes EBX.|
|46FE51..54 /6FE51|Pushes EBX=0, invokes471270 (authored-speed setter).|
|471270 /71270|Stores authored38, then forwards the same value to26C/live160.|
|471B50/471B60 /71B50/71B60|268 reads and26C writes current published160 only.|
Controller437C22..2D publishes through26C after applying movement, so it changes
current160 without changing authored38. Preparation43A750 clears controller608
and velocity but not either speed field38/160. Ordinary/retained Init through
437890→4587F0→470540 therefore reapplies authored speed; constructor default is0
and the current route's Jimmy properties do not assign another authored speed.
The bounded bridge's per-scene PublishedSpeed=0 follows this initialization
chain, rather than being inferred from controller608's separate Init reset.
Init is a copy of authored38, not an unconditional zero invariant. A future caller
of interface118→471270 with a nonzero authored value must preserve that value
through subsequent Init. No new source execution is claimed for this follow-up;
the retained REA Init result plus fixed getter/setter/constructor bytes establish
the route/default contract.
## Burst radius is the same live physics radius
There is no independent interaction-only100 radius in this source path:
| Source link | Structure/write |
|---|---|
|437FA3|Air helper obtains EDI=complete object+C0, the same game interface.|
|4384E4 /4384F3|Allowed burst with an effect pushes100, calls interface264.|
|Jimmy table4A373C+264→471B40|Writes interface15C, current body radius.|
|Table+260→471B30|Reads exactly interface15C;479D20 and47B890 both consume260.|
|PostLoad4236A3→110→471240|Writes authored34 then invokes264, initializing current radius60.|
|Held-state3 landing4386C1..C8|Writes current radius60 directly through264.|
|PostLoad4236B3→100→4711E0→254→471B00|Sets live support factor154=1.265;250→471AF0 reads it.|
Thus radius100 changes both sphere response and radius×factor support clearance
and root offset, to126.5 with the ordinary factor. Grounded Jimmy's ordinary
wrapper restores60 in its later object phase; physics/support must not perform
that restoration early or clear it merely because control is absent. Other
gadget radii (for example scooter160) remain outside the ordinary−1/3 subset.
## Verification and remaining integration questions
`python3 -m unittest discover -s tests -p test_body_composition_contract.py -v`
passes eight groups: original body/site identity; disabled-integration support
clear; phase order; descending split; three distinct flag gates; four-component
publication predicate; shared burst/support radius targets; Init authored/current
speed separation. These fixtures are
explicit source control-flow projections, not original execution or managed body
numeric verification. Existing ten isolated body observations and primary's
managed comparisons provide separate numeric evidence recorded by primary.
Before VR04 live use, compare root/support while radius changes60→100→60, retain
separate published160 versus controller608 across control loss, and verify the
phase owner for restoring radius. Source collision root and modern render foot
translation remain separate: no new capsule height or visual sole correction is
derived here. Full wrapper/registry, exact x87 cell/quick-magnitude boundaries,
special160/164/FENCE/LADDER callbacks, dynamic global context and whole original
game comparison remain open. An ordinary component passing numeric fixtures does
not establish those broader contracts.