fix: complete retail parity stability pass
All checks were successful
CI / linux-portable (push) Successful in 3m41s
CI / windows-gate (push) Successful in 6m49s
CI / release (push) Successful in 3m22s

This commit is contained in:
Erik 2026-08-28 20:01:39 +02:00
parent d3df4cb20a
commit f7aa8e0eb7
131 changed files with 7765 additions and 1190 deletions

View file

@ -2628,6 +2628,90 @@ public sealed class HeadlessSessionHostTests
Assert.Equal(0, firstEntry.PendingCount);
}
[Fact]
public void PublishedHeadlessPlayer_ChargedCommandJumpBecomesAirborne()
{
var operations = new FixtureSessionOperations();
using var credential = new HeadlessCredentialSecret(
"fixture",
"password");
using var host = new HeadlessSessionHost(
Descriptor(),
credential,
new HeadlessDiagnosticWriter(TextWriter.Null),
operations);
GameRuntime runtime = host.Runtime;
Assert.Equal(
RuntimeSessionStartStatus.Connected,
host.Start().Status);
const uint player = 0x50000014u;
runtime.PlayerIdentity.ServerGuid = player;
runtime.EntityObjects.Physics.SetPosition.BeginCollisionGeneration(
0xA9B40000u,
1UL);
AddFlatLandblock(runtime.EntityObjects.Physics.Engine);
runtime.EntityObjects.Physics.SetPosition.CommitCollisionGeneration(
0xA9B40000u,
1UL,
ready: true);
AcDream.Runtime.Session.RuntimeFirstEntryDriveController firstEntry =
CreateFirstEntryDrive(runtime);
RuntimeEntityRecord record = runtime.EntityObjects
.RegisterEntityWithInitialResidence(
Spawn(player),
isLocalPlayer: true)
.Canonical!;
Assert.True(runtime.EntityObjects.ApplyAcceptedSpawn(
record,
record.CreateIntegrationVersion,
record.Snapshot,
replaceGeneration: false));
var projection = new HeadlessSessionWorldProjection(
runtime,
new GateControllableCollisionNeighborhood
{
QuiescentOverride = true,
},
firstEntry);
projection.ProjectSpawn(record, isLocalPlayer: true);
for (int tick = 0;
tick < 200
&& runtime.MovementOwner.Controller is not
{ IsRuntimePublished: true };
tick++)
{
projection.PumpFirstEntry();
}
PlayerMovementController controller = Assert.IsType<
PlayerMovementController>(runtime.MovementOwner.Controller);
Assert.True(controller.IsRuntimePublished);
Assert.False(runtime.MovementOwner.Snapshot.IsAirborne);
var frame = new RuntimeLocalPlayerFrameController(
new HeadlessLocalPlayerFrameHost(
runtime,
CreateInertLiveSessionHost()),
new HeadlessMovementInputSource(runtime.MovementOwner));
Assert.True(host.Commands.Movement.SetIntent(
runtime.Generation,
new MovementInput(Jump: true)).Accepted);
for (int tick = 0; tick < 12; tick++)
frame.AdvanceBeforeNetwork(0.05f);
Assert.True(runtime.MovementOwner.JumpCharge.IsCharging);
Assert.True(host.Commands.Movement.SetIntent(
runtime.Generation,
new MovementInput(Jump: false)).Accepted);
frame.AdvanceBeforeNetwork(0.016f);
RuntimeMovementSnapshot movement = runtime.MovementOwner.Snapshot;
Assert.True(movement.IsAirborne);
Assert.True(movement.Velocity.Z > 0f);
}
/// <summary>
/// #365 test 4: <c>PumpFirstEntry</c> must not call <c>DriveAll</c> while
/// the collision neighborhood reports non-quiescent, and must call it on