feat(headless): hydrate isolated collision worlds

This commit is contained in:
Erik 2026-07-27 09:25:58 +02:00
parent 9569dadb57
commit b6547ff38c
20 changed files with 1960 additions and 101 deletions

View file

@ -69,28 +69,6 @@ internal sealed class LocalPlayerModeState : ILocalPlayerModeSource
}
}
/// <summary>
/// Session-scoped server-authoritative movement skills. Player-description
/// delivery and player-mode construction share this owner so rebuilding the
/// local physics controller cannot fall back to stale defaults.
/// </summary>
internal static class LocalPlayerSkillProjection
{
public static bool ApplyTo(
AcDream.Runtime.Gameplay.RuntimeMovementSkillState skills,
PlayerMovementController? controller)
{
ArgumentNullException.ThrowIfNull(skills);
AcDream.Runtime.Gameplay.RuntimeMovementSkillSnapshot snapshot =
skills.Snapshot;
if (controller is null || !snapshot.IsComplete)
return false;
controller.SetCharacterSkills(snapshot.RunSkill, snapshot.JumpSkill);
return true;
}
}
internal interface IViewportAspectSource
{
float Aspect { get; }

View file

@ -361,7 +361,9 @@ internal sealed class PlayerModeController :
exactMovement.CancelMoveTo(WeenieError.ActionCancelled);
};
if (LocalPlayerSkillProjection.ApplyTo(_skills, controller))
if (RuntimeMovementSkillProjection.ApplyTo(
_skills,
controller))
{
Console.WriteLine(
$"live: {loggingTag} — applied server skills "

View file

@ -277,7 +277,7 @@ internal sealed class LiveSessionRuntimeFactory
ResolveSkillFormulaBonus: skillCreditResolver.Resolve,
OnSkillsUpdated: (runSkill, jumpSkill) =>
{
if (LocalPlayerSkillProjection.ApplyTo(
if (RuntimeMovementSkillProjection.ApplyTo(
_domain.Character.MovementSkills,
_player.Controller.Controller))
{

View file

@ -164,11 +164,19 @@ public sealed class LandblockBuildFactory
// Task 8: merge stabs + scenery + interior into one entity list.
var merged = new List<AcDream.Core.World.WorldEntity>(hydrated);
merged.AddRange(BuildSceneryEntitiesForStreaming(
baseLoaded,
lbX,
lbY,
request.Origin));
merged.AddRange(
_dumpSceneryZ
? BuildSceneryEntitiesForStreaming(
baseLoaded,
lbX,
lbY,
request.Origin)
: LandblockPhysicsContentBuilder
.HydrateProceduralScenery(
_dats,
baseLoaded,
worldOffset,
_heightTable));
var envCellBuild = new AcDream.App.Rendering.Wb.EnvCellLandblockBuildBuilder(landblockId);
merged.AddRange(BuildInteriorEntitiesForStreaming(
landblockId,