Restore turning clips and attach jetpack fire to full player transform

This commit is contained in:
UnixNight committed 2026-11-05 15:25:50 -05:00
1 parent fafb54730a
commit f0be8504dd
14 files changed
+362 -9

No files matched your search

+10 -2
View File
@@ -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 }
/// <summary>
/// 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,