refactor(streaming): compose landblock presentation transaction
Own render, physics, DAT-static presentation, and retained static-resource rebinds behind retryable receipts so a failed publication resumes its exact unfinished suffix without replaying retail create-time defaults. Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
parent
e1110f7e54
commit
ea0da8c8ae
15 changed files with 1744 additions and 89 deletions
|
|
@ -64,6 +64,42 @@ public sealed class RetailStaticAnimatingObjectSchedulerTests
|
|||
Assert.Equal(2, posePublishes);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Rebind_RetainsSequencerAndPublishesIntoReplacementEntity()
|
||||
{
|
||||
var loader = new Loader();
|
||||
loader.Add(AnimationId, TwoFrameAnimation());
|
||||
var scheduler = new RetailStaticAnimatingObjectScheduler(
|
||||
loader,
|
||||
(_, _) => { },
|
||||
(_, _, _) => { });
|
||||
Setup setup = MakeSetup();
|
||||
WorldEntity first = MakeEntity();
|
||||
ScriptActivationInfo info = new(
|
||||
ScriptId: 0,
|
||||
PartTransforms: first.IndexedPartTransforms,
|
||||
PartAvailability: first.IndexedPartAvailable,
|
||||
Setup: setup,
|
||||
DefaultAnimationId: AnimationId,
|
||||
UsesStaticAnimationWorkset: true);
|
||||
scheduler.Register(first, info);
|
||||
scheduler.Tick(1f / 60f);
|
||||
float phaseBeforeRebind = first.MeshRefs[0].PartTransform.Translation.X;
|
||||
|
||||
WorldEntity replacement = MakeEntity();
|
||||
replacement.Position = new Vector3(4f, 5f, 6f);
|
||||
scheduler.Rebind(replacement, info with
|
||||
{
|
||||
PartTransforms = replacement.IndexedPartTransforms,
|
||||
PartAvailability = replacement.IndexedPartAvailable,
|
||||
});
|
||||
scheduler.Tick(1f / 60f);
|
||||
|
||||
Assert.Equal(1, scheduler.Count);
|
||||
Assert.True(
|
||||
replacement.MeshRefs[0].PartTransform.Translation.X > phaseBeforeRebind);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ShortStaticAnimFrame_RetainsCompleteTrailingPartState()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue