feat(headless): hydrate isolated collision worlds
This commit is contained in:
parent
9569dadb57
commit
b6547ff38c
20 changed files with 1960 additions and 101 deletions
|
|
@ -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; }
|
||||
|
|
|
|||
|
|
@ -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 "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue