feat(vfx): port retail hidden and teleport presentation
Preserve canonical live-object ownership across Hidden transitions and remote teleport placement so effects, collision, streaming, and targeting remain synchronized.
This commit is contained in:
parent
a51ebc66e9
commit
1e98d81448
46 changed files with 4883 additions and 127 deletions
39
src/AcDream.App/Physics/RemoteTeleportHook.cs
Normal file
39
src/AcDream.App/Physics/RemoteTeleportHook.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
using AcDream.Core.Physics;
|
||||
|
||||
namespace AcDream.App.Physics;
|
||||
|
||||
/// <summary>
|
||||
/// Ordered App seam for retail <c>CPhysicsObj::teleport_hook</c>
|
||||
/// (<c>0x00514ED0</c>). The action bundle keeps the port independently
|
||||
/// testable while the concrete movement/interpolation/target owners remain
|
||||
/// in the composition root.
|
||||
/// </summary>
|
||||
public static class RemoteTeleportHook
|
||||
{
|
||||
private const WeenieError TeleportCancelContext = (WeenieError)0x3Cu;
|
||||
|
||||
public static void Execute(RemoteTeleportHookActions actions)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(actions.CancelMoveTo);
|
||||
ArgumentNullException.ThrowIfNull(actions.UnStick);
|
||||
ArgumentNullException.ThrowIfNull(actions.StopInterpolating);
|
||||
ArgumentNullException.ThrowIfNull(actions.UnConstrain);
|
||||
ArgumentNullException.ThrowIfNull(actions.NotifyTeleported);
|
||||
ArgumentNullException.ThrowIfNull(actions.ReportCollisionEnd);
|
||||
|
||||
actions.CancelMoveTo(TeleportCancelContext);
|
||||
actions.UnStick();
|
||||
actions.StopInterpolating();
|
||||
actions.UnConstrain();
|
||||
actions.NotifyTeleported();
|
||||
actions.ReportCollisionEnd();
|
||||
}
|
||||
}
|
||||
|
||||
public sealed record RemoteTeleportHookActions(
|
||||
Action<WeenieError> CancelMoveTo,
|
||||
Action UnStick,
|
||||
Action StopInterpolating,
|
||||
Action UnConstrain,
|
||||
Action NotifyTeleported,
|
||||
Action ReportCollisionEnd);
|
||||
Loading…
Add table
Add a link
Reference in a new issue