diff --git a/docs/compatibility.md b/docs/compatibility.md index abf129b..cde984e 100644 --- a/docs/compatibility.md +++ b/docs/compatibility.md @@ -1,5 +1,12 @@ # Compatibility and validation +Turning/fire feedback (2026-11-05): source left/right turn clips restored for +low-speed grounded turning; jetpack fire now shares full owner pitch/yaw/roll +and visual alignment. Player visual/movement/data/director/jetpack/Python checks +pass, native Linux flight and both clip previews render with zero Vulkan errors. +Full source morph timing/native Windows comparison remain open. Details: +[turn/fire](gameplay/jimmy-turn-fire-fixes.md). + Body contact foundation (2026-11-05): finite XYZW publication, independent body modes, static-context retention and landing callback ownership implemented.100 full native numeric outputs and six state/branch comparisons pass; existing diff --git a/docs/gameplay/jimmy-turn-animation.md b/docs/gameplay/jimmy-turn-animation.md new file mode 100644 index 0000000..660f455 --- /dev/null +++ b/docs/gameplay/jimmy-turn-animation.md @@ -0,0 +1,119 @@ +# Jimmy grounded turning poses + +Recovered 2026-11-05 for restoring turn animation without replacing the recently +recovered movement implementation. All addresses are preferred-base EXE VAs; +the corresponding file offsets below are VA minus `0x400000` for this image. +Original files remain untouched. + +## Evidence and confidence + +**Recovered static facts:** retained REA original EXE disassembly +`artifacts/jimmy-movement-audit/rea-original-disassembly.json`, evidence +`ev_0d64cc58fa8f5573fc8e61e0f2c20e36288099212bd2257d3a3121361fd6c904`; +EXE SHA-256 +`f5281076e1a2492f2d61f87aae3f4544b6d0f535ebe33f9fbb6f78710fe1aea8`. +`tools/binary/jimmy_turn_animation.py` checks fixed range hashes, source strings, +thresholds and actual ASE identities. JN-Engine's original `C3DJimmy.md` index +was a constructor/resource lead; its replacement movement is not evidence here. + +## State owners and selection + +Jimmy's complete actor owns signed speed `+0x6C8` and signed short side substate +`+0x82A`; the game interface is complete actor `+0xC0`, so these become `+0x608` +and `+0x76A` inside `437940`. + +| Source VA / file offset | Recovered behavior | +| --- | --- | +| `438F6E / 38F6E` | Ground input handler clears complete `82A`. This is an input-phase write, not an unconditional player-update reset. | +| `4391BD / 391BD` | Keyboard Right writes `+1` to `82A`. | +| `439230 / 39230` | Keyboard Left writes `-1`; keyboard Left wins when both directions are held. | +| `437A8C / 37A8C`, `437AA8 / 37AA8` | Jump-held and unsupported cases leave the ordinary grounded selection path. Existing control/global busy gates also precede this path. | +| `437AC9 / 37AC9` | Compare **signed speed** with float **10.0**, stored at `48E5EC / 8E5EC`. Speed `>10` requests `RUN` regardless of side substate. | +| `437B18 / 37B18` | For speed `<=10`, read side substate. Zero proceeds to the existing primary-action/STOP decision. | +| `437B68 / 37B68`, `437B7E / 37B7E` | Side `-1` requests `LEFT` if complete vtable `+15C` predicate is false. | +| `437B85 / 37B85`, `437B91 / 37B91` | Other nonzero side requests `RIGHT` if the same predicate is false. | +| `437B72 / 37B72`, `437B85 / 37B85` | True primary-action predicate suppresses that side pose request, retaining the current action rather than switching to a turn. | + +`+15C` binds to `42A7A0 / 2A7A0`: global `4F83E0` makes it false; +otherwise it returns OR of bytes `509834`, `509845`, `509849`, `509AC4`. +Mapping this to the port's ordinary Fire input is a scoped implementation +interpretation, not a claim that every original input source is now reproduced. + +Ground input also writes `82A` for analog/mouse and camera-timer paths at +`439021`, `43904C`, `43907D`, `4390AD`, `439104`, `43914C`. Restoring keyboard +turn animation need not add or retune these movement paths. Preserve the field +across the project's already recovered input/player ordering; clearing it in a +pose getter would destroy the source state relationship. + +## Animation request versus acceptance + +Complete vtable `+150` binds to the Jimmy animation selector `43AFF0`; requests +above are not unconditional playback switches. + +* `43AFF8–43B00E / 3AFF8–3B00E`: compare requested/current logical animation name; + the identical-name case returns at `43B597`, preserving animation time. +* `43B273–43B284 / 3B273–3B284`: compare complete signed speed `6C8` with zero. + X87 C0 test branches to `43B597` for negative speed (also unordered), before + STOP/FALL/LEFT/RIGHT handling. **Backpedal therefore must keep BACK precedence** + even when `437940` would otherwise request a turn. Explicit BACK handling is + earlier at `43B227–43B270`. +* `43B32A–43B375 / 3B32A–3B375`: LEFT request calls action helper `+148`, then + generic start `+E0(LEFT,1)` at `43B351`, and clears body acceleration XYZ. +* `43B378–43B3C3 / 3B378–3B3C3`: RIGHT mirrors it, generic start at `43B39F`. + +The start argument **1** is directly observed, also used for RUN and BACK. +Looping these sustained poses in the existing port player is the bounded +interpretation. Full original generic animation frame/end semantics and special +HIT/SPLAT/FENCE/LADDER guards are outside this small restoration; do not replace +the complete animation selector with a newly invented priority table. + +## Resources and playback contract + +Constructor `422AC0` registers `HILEFT` with `jimleft.ase` through pushes +`422B42 / 22B42` and `422B47 / 22B47`; the corresponding RIGHT registration is +`422B56 / 22B56` and `422B5B / 22B5B`. Strings live at `4EF250`, `4EF248`, +`4EF238`, `4EF230`. Generic animation start `40DD90` prefixes logical names +with `HI` in the high-detail path (`40DE95`, HI string `4ED3DC`), producing the +registered identifiers. Low-detail prefix is `LOW`, not `LO`. + +Both supplied turn ASE files contain one `01jimmy` mesh, **6 samples**, times +`0,480,960,1440,1920,2400`, **10 fps**, **480 ticks/frame**, and **426 vertices** +per sample. They have 814 faces but no UVs; extract with textured `jimstop.ase` +as the morph base, retaining its face/UV topology as existing morph extraction +already does. This is not a separate skeletal animation or a yaw transform. + +Implementation contract for ordinary controlled grounded movement: + +1. Retain the source side substate as input state, Left `-1`, Right `+1`, zero + on each actual ground-input call; retain state between phases. +2. Existing jump/air/control/action ownership keeps precedence. Keep BACK for + negative travel. Positive speed above 10 keeps RUN. +3. At nonnegative speed up to 10, side state selects matching LEFT/RIGHT unless + primary action owns the request. Zero direction follows existing idle/action. +4. Load `jimleft` and `jimright` with `jimstop` topology, loop through the existing + morph player, and avoid restarting the same clip on every update. +5. Do not change physical yaw, body target, acceleration, jump or jetpack rules + merely to make the clips appear. The current turn-only keyboard behavior + reaches speed zero after its existing acceleration/coast logic; forward plus + turn normally exceeds the RUN threshold. + +## Implementation and verification boundary + +Before this restoration, `LabSimulation.Pose` had no turn poses, the preview +library had no LEFT/RIGHT mapping, and the preparation default omitted both +files. Parent integration owns those runtime/extractor changes and their C# +regressions. This investigation changes no gameplay code. + +The helper validates immutable original identity and static evidence, and parses +the real turn ASEs. It does **not** run original code, launch the original game, +or claim Linux/Windows visual verification. Runtime checks should cover idle +turn/release, both directions, forward+turn RUN, backpedal+turn BACK, jump/air +priority, action suppression, repeated-pose time continuity, and an actual scene +view. Remaining questions: source generic playback timing/end behavior and all +special-action interactions beyond this bounded ordinary pose restoration. + +Reproduce the evidence guard from `GamePort/`: + +```sh +python3 tools/binary/jimmy_turn_animation.py ../Original +``` diff --git a/docs/gameplay/jimmy-turn-fire-fixes.md b/docs/gameplay/jimmy-turn-fire-fixes.md new file mode 100644 index 0000000..88a88c8 --- /dev/null +++ b/docs/gameplay/jimmy-turn-fire-fixes.md @@ -0,0 +1,50 @@ +# Turning animations and rotating jetpack fire + +2026-11-05. User requests restoring turning animation and reports that jetpack +fire does not follow Jimmy's rotation. Movement/physics arithmetic is preserved. + +## Changes and evidence + +[Turning recovery](jimmy-turn-animation.md) records REA instruction evidence, +original addresses/offsets, source animation acceptance and supplied clip hashes. +`jimleft.ASE`/`jimright.ASE` each contain six original morph samples. They were +missing from default preparation and runtime pose/action mapping. Preparation +now exports them with jimstop's topology/UVs; the player loads LEFT/RIGHT, retains +the input-owned side field, and chooses the matching clip when grounded at +nonnegative speed≤10. Forward movement above10 retains RUN, negative travel keeps +the existing backpedal path, and takeoff/air/primary-action ownership takes +precedence. Repeated requests retain the same clip/time. Existing generic morph +loop timing remains its separately documented port policy. + +The retained REA EXE disassembly Evidence +`ev_0d64cc58fa8f5573fc8e61e0f2c20e36288099212bd2257d3a3121361fd6c904` +also covers jetpack42204C..4220BC (file2204C..220BC): owner310 returns its root, +then effect314 copies it; owner328 returns full Euler, then effect32C copies it. +Focused instructions are retained in artifacts/jimmy-turn-fire/fire-follow.asm. +The old JetpackVisuals used a yaw-only matrix. It now samples the original fire +morph through the same model transform as Jimmy, including pitch/yaw/roll and the +shared local sole-alignment correction. That correction is explicitly modern; +sharing it preserves original relative attachment instead of leaving the flame +in another visual frame. Geometry, scale, timer, visibility and energy are not +retuned. Exact final OMT matrix decomposition/animation cadence remain open. + +## Verification + +New PlayerVisualTests exercise both source six-frame clips, pose selection, +left precedence, release/run/jump/primary ownership, actual morph advancement and +same-pose time continuity. Fire tests compare the actual vertex buffer through +three combined rotations/translations, preserve unit determinant, and verify +hidden/reset behavior. The former movement assertion requiring idle while turning +now expects the left clip.28 movement groups, original-data/Director regressions, +14 jetpack groups, the new visual groups and333 Python tests pass; build has zero +warnings/errors. The source turn guard passes. These are bounded source and port +checks, not whole-original gameplay or native Windows comparison. +Native/package validation is appended below when complete. + +Native Linux GTX1070/private Xvfb replays pass the300-step right-mouse jetpack +sequence and both original turn-clip previews at1920×1080, zero Vulkan validation +errors. Forward/braking flame captures and the left clip were visually inspected; +flame orientation now follows the owner rather than remaining vertical. New +visual tests cover actual runtime pose selection as well as the sampled mesh. +Artifacts: artifacts/jimmy-turn-fire/window/. Native Windows and exact original +morph timing remain separate verification boundaries. diff --git a/docs/progress.md b/docs/progress.md index aaba2bf..08e6272 100644 --- a/docs/progress.md +++ b/docs/progress.md @@ -1,5 +1,21 @@ # Progress — 2026-11-05 +## Turning animation and jetpack attachment feedback + +Restored supplied six-frame jimleft/jimright clips to default preparation and +runtime pose/action selection. Standing/slow turns select the source direction; +forward running, backpedal, jump and primary action retain precedence. The input +side field is retained between its ground-input updates; repeating a pose does +not restart its clip. JetpackVisuals now shares Jimmy's full visual transform, +including pitch/roll and the modern local alignment, fixing yaw-only fire. + +New player visual groups,28 movement/14 jetpack, original-data/Director checks, +333 Python tests and source guard pass; build is clean. Native Linux powered +replay and both turn previews pass with zero Vulkan errors; captured flame tilt +was inspected. Source facts/modern alignment and timing limits: +[turn/fire fix](gameplay/jimmy-turn-fire-fixes.md). Body hazard/climb recovery +remains the subsequent priority; this feedback fix changes no movement physics. + ## Body root/mode ownership checkpoint Implemented the next Jimmy body prerequisites while keeping lab/outside capsule diff --git a/docs/tasks.md b/docs/tasks.md index d6144e9..2d126bf 100644 --- a/docs/tasks.md +++ b/docs/tasks.md @@ -46,6 +46,10 @@ compile, runtime and original-fidelity verification are separate. ## Immediate continuation +- [x] User feedback: restore original left/right turning animations and fix jetpack + fire following pitch/roll as well as yaw. Source guards, visual/pose tests and + native Linux rendering pass; see gameplay/jimmy-turn-fire-fixes.md. + - [ ] Current priority: stabilize Jimmy's ground/air input, facing, jump/landing, body/contact response and route/control transitions before more gadgets. Keep our movement baseline; JN-Engine is an original-code index, not a movement model. diff --git a/scripts/test.sh b/scripts/test.sh index 2102bf5..976c8f3 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -45,6 +45,7 @@ dotnet run --project tests/GamePort.LabRouteTests -- ../Original dotnet run --project tests/GamePort.UndergroundRouteTests -- ../Original dotnet run --project tests/GamePort.DynamicCollisionTests -- ../Original dotnet run --project tests/GamePort.JetpackTests +dotnet run --project tests/GamePort.PlayerVisualTests -- ../Original dotnet run --project tests/GamePort.ObjectiveTests -- ../Original dotnet run --project tests/GamePort.ProjectionTests -- ../Original python3 tests/GamePort.HudTests/test_ui.py diff --git a/src/GamePort/Application/JetpackVisuals.cs b/src/GamePort/Application/JetpackVisuals.cs index 86bbfc0..9318e87 100644 --- a/src/GamePort/Application/JetpackVisuals.cs +++ b/src/GamePort/Application/JetpackVisuals.cs @@ -24,8 +24,9 @@ public sealed class JetpackVisuals { draw.Visible = owner.JetpackEffectVisible; if (!draw.Visible) return; - var model = Matrix4x4.CreateRotationY(-owner.Yaw * MathF.PI / 180) - * Matrix4x4.CreateTranslation(owner.ActorRoot); - clip.Sample(owner.Steps / 60d, destination.Vertices.AsSpan(offset, clip.Base.Vertices.Length), model); + //42204C..4220B6 copies the owner's full root/Euler. Share the owner's + //local visual correction too, keeping the original relative attachment + //when the port aligns Jimmy's upright soles with the floor. + clip.Sample(owner.Steps / 60d, destination.Vertices.AsSpan(offset, clip.Base.Vertices.Length), owner.Model); } } diff --git a/src/GamePort/Application/PreviewAnimationLibrary.cs b/src/GamePort/Application/PreviewAnimationLibrary.cs index 5859d9f..7e806cd 100644 --- a/src/GamePort/Application/PreviewAnimationLibrary.cs +++ b/src/GamePort/Application/PreviewAnimationLibrary.cs @@ -47,14 +47,16 @@ public sealed class PreviewAnimationLibrary if (ReferenceEquals(clip, Current)) Name = label; } foreach (var (pose, folder) in new[] { (PlayerPose.Idle, "jimstop"), (PlayerPose.Run, "jimrun"), - (PlayerPose.Backpedal, "jimbackpedal"), (PlayerPose.Jump, "jimjump"), (PlayerPose.Fall, "jimfall"), (PlayerPose.Fly, "jimfly"), (PlayerPose.Shoot, "jimshoot") }) + (PlayerPose.Backpedal, "jimbackpedal"), (PlayerPose.Jump, "jimjump"), (PlayerPose.Fall, "jimfall"), (PlayerPose.Fly, "jimfly"), (PlayerPose.Shoot, "jimshoot"), + (PlayerPose.TurnLeft,"jimleft"),(PlayerPose.TurnRight,"jimright") }) { var path = Path.Combine(parent, folder, "animation.json"); if (!File.Exists(path)) continue; movement[pose] = Load(path); } foreach (var (action, folder) in new[] { ("STOP", "jimstop"), ("TALK", "jimtalk"), ("RUN", "jimrun"), - ("JUMP", "jimjump"), ("FALL", "jimfall"), ("SCRATCH", "jimscratch"), ("FLY", "jimfly"), ("SHOOT", "jimshoot") }) + ("JUMP", "jimjump"), ("FALL", "jimfall"), ("SCRATCH", "jimscratch"), ("FLY", "jimfly"), ("SHOOT", "jimshoot"), + ("LEFT","jimleft"),("RIGHT","jimright") }) { var path = Path.Combine(parent, folder, "animation.json"); if (File.Exists(path)) actions[action] = Load(path); diff --git a/src/GamePort/Game/LabSimulation.cs b/src/GamePort/Game/LabSimulation.cs index e9ddd60..2c5ca9f 100644 --- a/src/GamePort/Game/LabSimulation.cs +++ b/src/GamePort/Game/LabSimulation.cs @@ -6,7 +6,7 @@ namespace GamePort.Game; public readonly record struct PlayerInput(bool Forward, bool Backward, bool Left, bool Right, bool Jump, bool Rise = false, bool Descend = false, bool StrafeLeft = false, bool StrafeRight = false, bool Fast = false, bool Fire = false, bool RocketTurn = false, bool RocketRoll = false, bool RocketMouseRise = false,bool GrapplerEnter=false); -public enum PlayerPose { Idle, Run, Backpedal, Jump, Fall, Fly, Shoot, Swing } +public enum PlayerPose { Idle, Run, Backpedal, Jump, Fall, Fly, Shoot, Swing, TurnLeft, TurnRight } /// /// Walking, airborne steering and jetpack checkpoint. Recovered arithmetic is described in @@ -35,6 +35,8 @@ public sealed class LabSimulation private JetpackBurstState jumpState; private bool forceFall; private bool keyboardTurn, hasSupportPolygon; + private sbyte groundTurnDirection; + private bool primaryHeld; private Vector3 noclipEntry; private float noclipEntryYaw; private int gadgetMode = -1; @@ -127,7 +129,9 @@ public sealed class LabSimulation : Grappler?.SwingPose==true ? PlayerPose.Swing : GadgetMode == 0 ? bubblePose : pendingImpulse.Y > 0 ? PlayerPose.Jump - : Grounded ? Shooting ? PlayerPose.Shoot : Speed < -1 ? PlayerPose.Backpedal : Speed > 1 ? PlayerPose.Run : PlayerPose.Idle + : Grounded ? Shooting ? PlayerPose.Shoot : Speed < -1 ? PlayerPose.Backpedal : Speed > 10 ? PlayerPose.Run + : Speed>=0&&!primaryHeld&&groundTurnDirection<0 ? PlayerPose.TurnLeft + : Speed>=0&&!primaryHeld&&groundTurnDirection>0 ? PlayerPose.TurnRight : PlayerPose.Idle : jumpState.JumpState == 3 && jumpState.EffectRemaining > 0 ? PlayerPose.Fly : !forceFall && Velocity.Y > 0 ? PlayerPose.Jump : PlayerPose.Fall; public int Steps { get; private set; } @@ -205,6 +209,7 @@ public sealed class LabSimulation Speed = PublishedSpeed = TurnRate = extraAirAcceleration = shadowDistance = 0; lateralContribution = 0; pendingImpulse = Vector3.Zero; movementMode = 0; keyboardTurn=false;hasSupportPolygon=false; + groundTurnDirection=0;primaryHeld=false; jumpState = default; forceFall = JetpackEffectVisible = false; Shooting = false; @@ -426,6 +431,7 @@ public sealed class LabSimulation if (gadgetMode==0) { GadgetMode=-1; DefaultGadgetRequested?.Invoke(); } Shooting = false; Velocity = pendingImpulse = Vector3.Zero; + groundTurnDirection=0;primaryHeld=false; Speed = PublishedSpeed = TurnRate = extraAirAcceleration = lateralContribution = 0; jumpState = default; movementMode = 0; forceFall = JetpackEffectVisible = false; //Modern debug stop freezes the retained facing request as well as body @@ -464,9 +470,11 @@ public sealed class LabSimulation { const float dt = FixedStepClock.Step; lateralContribution = 0; + primaryHeld=input.Fire; //438A60 dispatches by stored movement mode, not current support. if (movementMode == 0) { + groundTurnDirection=(sbyte)(input.Left?-1:input.Right?1:0); //complete82A: keyboard Left wins. //The830 backward clock owner remains unresolved; ordinary state0 //does not invent a hold timer or admit its seeded auto-turn branch. var ground=JimmyGroundMotion.Input(new(Speed,targetYaw),Yaw,input,MaximumSpeed, diff --git a/tests/GamePort.MovementTests/Program.cs b/tests/GamePort.MovementTests/Program.cs index 5b66f79..bfa01c9 100644 --- a/tests/GamePort.MovementTests/Program.cs +++ b/tests/GamePort.MovementTests/Program.cs @@ -327,7 +327,7 @@ static void SpeedLimits() var turn = FlatSimulation(); for (var i = 0; i < 40; i++) turn.Step(new(false, false, true, false, false)); Near(turn.Speed, 0, 0, "turn-only +30 then decay35 clamps at zero"); - Check(turn.Grounded && turn.Pose == PlayerPose.Idle, "turn-only remains supported and idle"); + Check(turn.Grounded && turn.Pose == PlayerPose.TurnLeft, "turn-only remains supported and uses the left turning clip"); var walk = FlatSimulation(); walk.Step(new(true, false, false, false, false)); diff --git a/tests/GamePort.PlayerVisualTests/GamePort.PlayerVisualTests.csproj b/tests/GamePort.PlayerVisualTests/GamePort.PlayerVisualTests.csproj new file mode 100644 index 0000000..cb11848 --- /dev/null +++ b/tests/GamePort.PlayerVisualTests/GamePort.PlayerVisualTests.csproj @@ -0,0 +1,7 @@ + + Exenet10.0enableenablefalse + + + + + diff --git a/tests/GamePort.PlayerVisualTests/Program.cs b/tests/GamePort.PlayerVisualTests/Program.cs new file mode 100644 index 0000000..afa81b3 --- /dev/null +++ b/tests/GamePort.PlayerVisualTests/Program.cs @@ -0,0 +1,54 @@ +using System.Numerics; +using GamePort.Assets; +using GamePort.Game; +using GamePort.Application; + +var original=Path.GetFullPath(args.Length==1?args[0]:"../Original"); +var prepared=Path.GetFullPath("artifacts/extracted"); +var standing=AseMesh.Load(AssetPath.Resolve(original,"ASE/jimstop.ase")); +var floor=new Mesh(new[]{new Vector3(-10000,0,-10000),new Vector3(-10000,0,10000),new Vector3(10000,0,10000),new Vector3(10000,0,-10000)} + .Select(p=>new MeshVertex(p,Vector2.Zero,Vector3.One)).ToArray(),[0,1,2,0,2,3]); +LabSimulation Player()=>new(new(floor),standing,new Vector3(0,20,0),0); + +foreach(var left in new[]{true,false}) +{ + var p=Player();var input=new PlayerInput(false,false,left,!left,false); + for(int i=0;i<20;i++)p.Step(input); + Check(p.Speed==0&&p.Grounded&&p.Pose==(left?PlayerPose.TurnLeft:PlayerPose.TurnRight),"standing turn selects directional clip"); + var clips=new PreviewAnimationLibrary(Path.Combine(prepared,"animations/jimstop/animation.json")); + Check(clips.SelectPose(p.Pose)&&clips.Current.HasVertexMotion&&clips.Current.FrameCount==6,"original six-frame turn clip is loaded"); + var first=new MeshVertex[clips.Current.Base.Vertices.Length];var next=new MeshVertex[first.Length]; + clips.Current.Sample(0,first,Matrix4x4.Identity);clips.Current.Sample(clips.Current.SampleInterval,next,Matrix4x4.Identity); + Check(first.Where((v,i)=>v.Position!=next[i].Position).Any(),"turn clip advances instead of holding a static pose"); + Check(!clips.SelectPose(p.Pose),"holding turn does not restart its animation every step"); + Check(clips.SelectAction(left?"RIGHT":"LEFT"),"authored turn action maps to original family"); + p.Step(default);Check(p.Pose==PlayerPose.Idle,"release leaves standing turn"); + for(int i=0;i<20;i++)p.Step(input with{Forward=true}); + Check(p.Pose==PlayerPose.Run,"forward turning keeps the run cycle"); + p.Step(input with{Jump=true});Check(p.Pose==PlayerPose.Jump,"takeoff overrides ground turn"); +} +var both=Player();both.Step(new(false,false,true,true,false));Check(both.Pose==PlayerPose.TurnLeft,"left input wins"); +var primary=Player();primary.Step(new(false,false,true,false,false,Fire:true));Check(primary.Pose!=PlayerPose.TurnLeft,"primary input suppresses a new turn pose"); +primary.SetShooting(true);Check(primary.Pose==PlayerPose.Shoot,"active shot owns its pose"); +Console.WriteLine("PASS source directional turn selection, six-frame motion, hold/release, run/jump/primary precedence and authored actions"); + +var owner=Player();owner.LevelCode="VR04"; +Check(owner.ApplyRetainedLevelState(new("LV1B",3,1,.625f,6.125f)),"powered effect fixture"); +owner.RestoreReturnRoot(owner.ActorRoot+Vector3.UnitY*400); +var visuals=new JetpackVisuals(new Mesh([],[]),prepared); +var clip=new MorphAnimation(Path.Combine(prepared,"actors/jetpack/fire/animation.json")); +foreach(var rotation in new[]{new Vector3(-35,65,-20),new Vector3(15,220,25),new Vector3(0,359,0)}) +{ + owner.ApplyAuthoredTransform(owner.ActorRoot+new Vector3(10,5,-7),rotation); + owner.Step(default,controlled:false); + visuals.Update(visuals.Mesh,owner); + Check(visuals.Mesh.Draws[^1].Visible&&owner.JetpackEffectVisible,"active effect remains visible"); + var expected=new MeshVertex[clip.Base.Vertices.Length];clip.Sample(owner.Steps/60d,expected,owner.Model); + for(int i=0;i