acdream/src/AcDream.App/World/LiveEntityPartArrayEnterWorldPort.cs
Erik f9736ece6c fix(runtime): restore interaction completion ownership
Preserve prepublication local motion completion, require the PartArray enter-world lifecycle port, and balance deferred Use busy ownership across dispatch and cancellation. Reconcile the completed GameWindow connected gates and add regression coverage.

Co-authored-by: Codex <codex@openai.com>
2026-07-23 05:51:51 +02:00

22 lines
842 B
C#

namespace AcDream.App.World;
/// <summary>
/// Strongly typed retail PartArray world-entry boundary.
/// </summary>
/// <remarks>
/// <c>CPhysicsObj::set_hidden @ 0x00514C60</c> invokes
/// <c>CPartArray::HandleEnterWorld @ 0x00517D70</c> on both Hidden edges.
/// This dedicated port prevents that mandatory lifecycle callback from being
/// confused with neighboring <see cref="Action{T}"/> presentation callbacks.
/// </remarks>
public sealed class LiveEntityPartArrayEnterWorldPort
{
private readonly Action<uint> _handleEnterWorld;
public LiveEntityPartArrayEnterWorldPort(Action<uint> handleEnterWorld) =>
_handleEnterWorld = handleEnterWorld
?? throw new ArgumentNullException(nameof(handleEnterWorld));
public void HandleEnterWorld(uint localEntityId) =>
_handleEnterWorld(localEntityId);
}