refactor(world): extract live entity hydration
This commit is contained in:
parent
27dcd0ecb7
commit
d10c5f2d54
17 changed files with 4310 additions and 1269 deletions
|
|
@ -41,6 +41,26 @@ internal static class SpawnMotionInitializer
|
|||
return sequencer;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Replays description-time MovementData into the same retained PartArray
|
||||
/// sequencer. This is used only when a fresher same-incarnation CreateObject
|
||||
/// interrupted initial hydration before the object crossed its ready edge;
|
||||
/// completed objects consume the packet through SetObjectMovement instead.
|
||||
/// </summary>
|
||||
public static void Reinitialize(
|
||||
AnimationSequencer sequencer,
|
||||
MotionTable motionTable,
|
||||
CreateObject.ServerMotionState? wireState)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(sequencer);
|
||||
ArgumentNullException.ThrowIfNull(motionTable);
|
||||
Plan plan = ResolvePlan(motionTable, wireState);
|
||||
sequencer.Reset();
|
||||
sequencer.InitializeState();
|
||||
sequencer.SetCycle(plan.Style, plan.Motion);
|
||||
sequencer.Manager.HandleEnterWorld();
|
||||
}
|
||||
|
||||
internal static Plan ResolvePlan(
|
||||
MotionTable motionTable,
|
||||
CreateObject.ServerMotionState? wireState)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue