feat(runtime): freeze initial placement inbound admission
This commit is contained in:
parent
9d601817b8
commit
30012361e1
9 changed files with 2506 additions and 323 deletions
|
|
@ -54,6 +54,19 @@ internal enum RuntimeTeleportHookPhase : byte
|
|||
AfterEnterWorld,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Exact placement of retail's <c>ConstrainTo</c> relative to the selected
|
||||
/// position operation. Local ordinary corrections constrain before their
|
||||
/// optional interpolation; teleports and remote hard moves constrain only
|
||||
/// after the position operation succeeds.
|
||||
/// </summary>
|
||||
internal enum RuntimePositionConstrainPhase : byte
|
||||
{
|
||||
None,
|
||||
BeforePositionOperation,
|
||||
AfterPositionOperation,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Exact accepted-wire authority for one presentation-independent position
|
||||
/// route. <see cref="RuntimeEntityKey"/> identifies the incarnation while
|
||||
|
|
@ -147,7 +160,7 @@ internal readonly record struct RuntimeAuthoritativePositionRoute(
|
|||
bool LeaveWorld,
|
||||
RuntimeTeleportHookPhase TeleportHookPhase,
|
||||
bool StopInterpolating,
|
||||
bool ConstrainAfterRouting,
|
||||
RuntimePositionConstrainPhase ConstrainPhase,
|
||||
bool PreserveHeading,
|
||||
bool ZeroVelocity,
|
||||
bool SendPositionImmediately,
|
||||
|
|
@ -163,6 +176,12 @@ internal readonly record struct RuntimeAuthoritativePositionRoute(
|
|||
|
||||
internal bool RunsTeleportHook =>
|
||||
TeleportHookPhase is not RuntimeTeleportHookPhase.None;
|
||||
|
||||
internal bool ConstrainBeforeRouting =>
|
||||
ConstrainPhase is RuntimePositionConstrainPhase.BeforePositionOperation;
|
||||
|
||||
internal bool ConstrainAfterRouting =>
|
||||
ConstrainPhase is RuntimePositionConstrainPhase.AfterPositionOperation;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -214,7 +233,7 @@ internal static class RuntimeAuthoritativePositionRouteClassifier
|
|||
LeaveWorld: false,
|
||||
TeleportHookPhase: RuntimeTeleportHookPhase.None,
|
||||
StopInterpolating: false,
|
||||
ConstrainAfterRouting: false,
|
||||
ConstrainPhase: RuntimePositionConstrainPhase.None,
|
||||
PreserveHeading: false,
|
||||
ZeroVelocity: false,
|
||||
SendPositionImmediately: false,
|
||||
|
|
@ -246,7 +265,7 @@ internal static class RuntimeAuthoritativePositionRouteClassifier
|
|||
? RuntimeTeleportHookPhase.AfterEnterWorld
|
||||
: RuntimeTeleportHookPhase.None,
|
||||
StopInterpolating: false,
|
||||
ConstrainAfterRouting: false,
|
||||
ConstrainPhase: RuntimePositionConstrainPhase.None,
|
||||
PreserveHeading: false,
|
||||
ZeroVelocity: false,
|
||||
SendPositionImmediately: false,
|
||||
|
|
@ -286,7 +305,7 @@ internal static class RuntimeAuthoritativePositionRouteClassifier
|
|||
LeaveWorld: false,
|
||||
TeleportHookPhase: RuntimeTeleportHookPhase.None,
|
||||
StopInterpolating: false,
|
||||
ConstrainAfterRouting: false,
|
||||
ConstrainPhase: RuntimePositionConstrainPhase.None,
|
||||
PreserveHeading: true,
|
||||
ZeroVelocity: false,
|
||||
SendPositionImmediately: true,
|
||||
|
|
@ -309,7 +328,7 @@ internal static class RuntimeAuthoritativePositionRouteClassifier
|
|||
LeaveWorld: false,
|
||||
TeleportHookPhase: RuntimeTeleportHookPhase.AfterPositionOperation,
|
||||
StopInterpolating: false,
|
||||
ConstrainAfterRouting: true,
|
||||
ConstrainPhase: RuntimePositionConstrainPhase.AfterPositionOperation,
|
||||
PreserveHeading: false,
|
||||
ZeroVelocity: true,
|
||||
SendPositionImmediately: false,
|
||||
|
|
@ -331,7 +350,7 @@ internal static class RuntimeAuthoritativePositionRouteClassifier
|
|||
LeaveWorld: false,
|
||||
TeleportHookPhase: RuntimeTeleportHookPhase.None,
|
||||
StopInterpolating: false,
|
||||
ConstrainAfterRouting: true,
|
||||
ConstrainPhase: RuntimePositionConstrainPhase.BeforePositionOperation,
|
||||
PreserveHeading: false,
|
||||
ZeroVelocity: false,
|
||||
SendPositionImmediately: false,
|
||||
|
|
@ -357,7 +376,7 @@ internal static class RuntimeAuthoritativePositionRouteClassifier
|
|||
LeaveWorld: false,
|
||||
TeleportHookPhase: RuntimeTeleportHookPhase.BeforePositionOperation,
|
||||
StopInterpolating: false,
|
||||
ConstrainAfterRouting: true,
|
||||
ConstrainPhase: RuntimePositionConstrainPhase.AfterPositionOperation,
|
||||
PreserveHeading: false,
|
||||
ZeroVelocity: false,
|
||||
SendPositionImmediately: false,
|
||||
|
|
@ -383,7 +402,7 @@ internal static class RuntimeAuthoritativePositionRouteClassifier
|
|||
LeaveWorld: false,
|
||||
TeleportHookPhase: RuntimeTeleportHookPhase.None,
|
||||
StopInterpolating: false,
|
||||
ConstrainAfterRouting: false,
|
||||
ConstrainPhase: RuntimePositionConstrainPhase.None,
|
||||
PreserveHeading: false,
|
||||
ZeroVelocity: false,
|
||||
SendPositionImmediately: false,
|
||||
|
|
@ -413,7 +432,7 @@ internal static class RuntimeAuthoritativePositionRouteClassifier
|
|||
LeaveWorld: false,
|
||||
TeleportHookPhase: RuntimeTeleportHookPhase.None,
|
||||
StopInterpolating: !nearby,
|
||||
ConstrainAfterRouting: true,
|
||||
ConstrainPhase: RuntimePositionConstrainPhase.AfterPositionOperation,
|
||||
PreserveHeading: false,
|
||||
ZeroVelocity: false,
|
||||
SendPositionImmediately: false,
|
||||
|
|
@ -445,7 +464,7 @@ internal static class RuntimeAuthoritativePositionRouteClassifier
|
|||
LeaveWorld: true,
|
||||
TeleportHookPhase: RuntimeTeleportHookPhase.None,
|
||||
StopInterpolating: false,
|
||||
ConstrainAfterRouting: false,
|
||||
ConstrainPhase: RuntimePositionConstrainPhase.None,
|
||||
PreserveHeading: false,
|
||||
ZeroVelocity: false,
|
||||
SendPositionImmediately: false,
|
||||
|
|
@ -532,7 +551,7 @@ internal static class RuntimeAuthoritativePositionRouteClassifier
|
|||
LeaveWorld: false,
|
||||
TeleportHookPhase: RuntimeTeleportHookPhase.None,
|
||||
StopInterpolating: false,
|
||||
ConstrainAfterRouting: false,
|
||||
ConstrainPhase: RuntimePositionConstrainPhase.None,
|
||||
PreserveHeading: false,
|
||||
ZeroVelocity: false,
|
||||
SendPositionImmediately: false,
|
||||
|
|
@ -552,7 +571,7 @@ internal static class RuntimeAuthoritativePositionRouteClassifier
|
|||
LeaveWorld: false,
|
||||
TeleportHookPhase: RuntimeTeleportHookPhase.None,
|
||||
StopInterpolating: false,
|
||||
ConstrainAfterRouting: false,
|
||||
ConstrainPhase: RuntimePositionConstrainPhase.None,
|
||||
PreserveHeading: false,
|
||||
ZeroVelocity: false,
|
||||
SendPositionImmediately: false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue