109 lines
6.0 KiB
Markdown
109 lines
6.0 KiB
Markdown
# Laboratory jet pack and powered jump
|
|
|
|
Read-only static recovery plus managed implementation,2026-10-24. EXE text file
|
|
offsets are VA minus0x400000. Neutron.exe SHA-256 is
|
|
f5281076e1a2492f2d61f87aae3f4544b6d0f535ebe33f9fbb6f78710fe1aea8.
|
|
Original DLL/frame and original game comparisons are separate evidence categories.
|
|
|
|
## Identity
|
|
|
|
The lab pickup's GAM tag SHRINKRAY/PickupIndex301 is a prototype/internal name.
|
|
Original screens.omt Canv120 says GET JET PACK; its effect grants inventory
|
|
group0/item3. That exact inventory slot gates the powered-jump code43848E/4385C9.
|
|
It must not be presented as a shrink-ray weapon. The original readme describes
|
|
Shift/Insert/right mouse as Jump - Jet Pack Burst. The actual C3DShrinkRay class
|
|
has separate ray.ase/ray0000..2.png bindings440035..A6, outside this implementation.
|
|
|
|
## Controller and state order
|
|
|
|
Game/JetpackBurst.cs translates the vertical state/action subset of437F90.
|
|
Grounded/released outer update437B9E resets jump state0 before air application.
|
|
States below3 set extra acceleration to gravity*1.33f-gravity at438148..18D.
|
|
With gravity-800 this yields-264 extra/-1064 net. The initial jump queues550
|
|
at4383B3 and clears the effect timer; the hold timer starts0.
|
|
|
|
State1 adds dt and starts a burst only after hold is strictly>.4f
|
|
(4383FD..418). State2 renewed hold attempts immediately (438559). Both enter
|
|
state3 even when disabled. Allowed start sets effect time8 (field884, ctor437640),
|
|
current radius100 when the effect exists (4384DE..F3), requests FLY and sets
|
|
vertical velocity10 (4384F9..546). Slot138(2) invokes a gadget/sound callback;
|
|
it is not a proven movement-mode assignment and the component does not invent one.
|
|
|
|
Start is disallowed in LEV6,LV4B,LV6A,LEV3,LV3A/B/C/D; gadget modes2/6/7;
|
|
nonpositive global4F83D4; or inventory item3 state0/4. VR04 bypasses those guards
|
|
(43841E..4384D4,438559..633). Other nonzero inventory states remain accepted.
|
|
|
|
Before state dispatch, states>=3 inspect the effect timer. An existing effect
|
|
with time<=0 resets states3/4 to0, requests FALL, stops the gadget and returns
|
|
before replacing acceleration (438192..20D). The previous extra acceleration
|
|
therefore survives that invocation. This is also why unavailable gadgets can
|
|
repeat ordinary jumps on landing while jump remains held.
|
|
|
|
With positive burn time, distance-controlled extra acceleration is:
|
|
|
|
| Condition | Extra Y | Net Y including gravity |
|
|
| --- | --- | --- |
|
|
| Shadow distance<500, velocityY>=-1 |880|80|
|
|
| Shadow distance<500, velocityY<-1 |1040|240|
|
|
| Shadow distance>=500 |720|-80|
|
|
|
|
Near-branch .1/.3 are stored doubles; far .1 is float (438210..30D).
|
|
Source distance86C comes from Jimmy to his shadow425450..47C. Shadow query
|
|
4252E0 uses a vertical segment2500 downward and places its root hitY+13 for
|
|
default height30. Current integration approximates this query with the port's
|
|
walkable floor query; failed queries retain prior distance.
|
|
|
|
Held state3 landing stops the effect, restores radius60 and enters4
|
|
(438693..6EF). Airborne release stops the timer, requests FALL and enters4
|
|
without a radius restore (438745..780). Jimmy's next ordinary grounded update
|
|
42469B restores60. Source released table state4 goes directly to reset43879A;
|
|
state5 checks grounding. The component's tests preserve these distinct branches.
|
|
|
|
## Effect, energy and visual assets
|
|
|
|
C3DJetpackFire update421FB0 obtains its owner. Grounded owner sets remaining0;
|
|
then it subtracts dt, including when inactive (421FDD..422009). A nonpositive
|
|
result hides it. A positive result shows it and adjusts global4F83D4 by-dt*.5
|
|
(42202B..3B). Timer values are not clamped to0. Empty owner/effect leaves fields
|
|
unchanged. Running burn is not cancelled merely because energy reaches0.
|
|
|
|
Energy helper42A920 skips adjustments for numeric FourCC VR01..VR08, otherwise
|
|
adds the requested amount and clamps0..100 (42A975..9C1). Low/empty-energy sounds
|
|
and other energy/damage consumers are not yet mapped. The original TSK float
|
|
PlayerValue retains this global. SceneInteractions now preserves live energy
|
|
when producing a checkpoint snapshot.
|
|
|
|
Effect bindings421F30..96 are DEFAULT fire.ase, HINONE fire2.ase and fire.png.
|
|
The active effect follows owner root/Euler directly at42204C..B6. Preparation
|
|
exports the original two-triangle morph; JetpackVisuals samples it into the final
|
|
combined GPU buffer and controls its draw from the effect phase. Exact effect
|
|
translucency and global morph cadence remain open. Jimmy HIFLY->jimfly.ase is
|
|
registered at422B1A..26; its426 point vectors reuse the original Jimmy base UVs.
|
|
|
|
## Integration and verification boundary
|
|
|
|
LabSimulation uses controller -> movement/static/dynamic collision -> effect
|
|
update at fixed60Hz. Original global object iteration/phase order is unresolved;
|
|
the pure APIs expose controller and effect phases separately rather than hiding
|
|
that choice. Normal logical actor-root clearance is now75.9 from recovered
|
|
PostLoad/support constants; player capsule radius24, full wall solver and sole
|
|
placement remain provisional. Burst100/landing60 radius changes currently affect
|
|
contacts and moving-door broadphase; they do not make the modern capsule exact.
|
|
|
|
Fourteen JetpackTests groups pass: takeoff/release/refire, strict .4 threshold,
|
|
disabled repeat, all source start gates/VR04 exception, acceleration thresholds,
|
|
transition acceleration/radius semantics, timer/energy order, negative inactive
|
|
timer, energy clamp/VR immunity, depletion, explicit phase differences, absent
|
|
effect and bounded malformed input. The existing13 movement groups still pass.
|
|
These are static/data/port algorithm checks. Original gameplay/native Windows
|
|
comparison remains required before a fidelity claim.
|
|
|
|
|
|
## Airborne steering correction
|
|
|
|
User testing found frozen horizontal control during powered flight. The original
|
|
mode1 dispatcher falls through to439900; the earlier no-input interpretation was
|
|
wrong. AirSteering now supplies the separate source airborne keyboard path for
|
|
both jumps and bursts. Up accelerates, Left/Right ramp turn rate, Down brakes.
|
|
See air-steering.md for dispatch proof, exact arithmetic and new movement/GPU tests.
|