acdream carried 16 status codes, curated by hand out of the CMotionInterp and MoveToManager decompilation passes. The other 362 were unnamed, which made every one of them a cast site waiting to happen. This slice takes the whole table: 372 values under 378 names. The oracle set is finally complete. All six vendored reference repos were empty when the 2026-07-29 enum campaign ran, which is why it deferred this decision; they are re-cloned now, so ACE's WeenieError could be read directly instead of leaning on the UtilityBelt catalog alone. The two agree without a single conflict. ACE has 369 members, no internal value collisions. The catalog has 372, shares all 369 ACE names, and disagrees on none of their values. Its three extras -- IsNowOpenFellowship (0x050B), IsNowClosedFellowship (0x050C), LockedFellowshipCannotRecruit (0x0518) -- each turn up in ACE's separate WeenieErrorWithString enum with a `_` marking the interpolated name, so the catalog is just the less-split view of the same client enum. All three are adopted on agreement between two oracles, not on one. Retail cannot arbitrate any of this. acclient.h has no counterpart enum; its charError (26) is character-creation only. Recorded, not guessed around. Six values keep two names. acdream's NotGrounded, CrouchInCombatStance, SitInCombatStance, SleepInCombatStance, ChatEmoteOutsideNonCombat and ActionDepthExceeded are each anchored to a retail decompilation site, where ACE's names for those values are server-side coinages. Rather than pick, both are declared, acdream's first so ToString() is untouched. Behaviour is unchanged, and there is no way for it not to be: nothing in the tree branches on a WeenieError member. MotionInterpreter's switch is on a motion type and merely returns one of these; WeenieErrorText.For switches on a raw uint; the chat translation table WeenieErrorMessages is keyed on uint throughout, so naming a code does not make it render. The one site that moved is RemoteTeleportHook, where the (WeenieError)0x3Cu cast becomes the now-named WeenieError.ITeleported at the same value. Register row AP-15 is narrowed rather than retired. Its code-catalog caveat is superseded -- an unnamed code is no longer a way for it to bite -- but the sentences are still ACE's doc comments rather than retail's string_table.bin, and that part stands. The enum moved out of MotionInterpreter.cs into its own file at the same namespace. At 372 members it does not belong inside a physics class file. Core tests 3903 passed / 2 skipped. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
57 lines
1.9 KiB
C#
57 lines
1.9 KiB
C#
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
|
|
{
|
|
// 0x3C had no name until the 2026-07-29 WeenieError adoption; the cast it
|
|
// needed is gone, the value is unchanged.
|
|
private const WeenieError TeleportCancelContext = WeenieError.ITeleported;
|
|
|
|
public static bool Execute(
|
|
RemoteTeleportHookActions actions,
|
|
Func<bool>? isCurrent = null)
|
|
{
|
|
ArgumentNullException.ThrowIfNull(actions.CancelMoveTo);
|
|
ArgumentNullException.ThrowIfNull(actions.UnStick);
|
|
ArgumentNullException.ThrowIfNull(actions.StopInterpolating);
|
|
ArgumentNullException.ThrowIfNull(actions.UnConstrain);
|
|
ArgumentNullException.ThrowIfNull(actions.NotifyTeleported);
|
|
ArgumentNullException.ThrowIfNull(actions.ReportCollisionEnd);
|
|
|
|
bool Current() => isCurrent?.Invoke() ?? true;
|
|
if (!Current())
|
|
return false;
|
|
actions.CancelMoveTo(TeleportCancelContext);
|
|
if (!Current())
|
|
return false;
|
|
actions.UnStick();
|
|
if (!Current())
|
|
return false;
|
|
actions.StopInterpolating();
|
|
if (!Current())
|
|
return false;
|
|
actions.UnConstrain();
|
|
if (!Current())
|
|
return false;
|
|
actions.NotifyTeleported();
|
|
if (!Current())
|
|
return false;
|
|
actions.ReportCollisionEnd();
|
|
return Current();
|
|
}
|
|
}
|
|
|
|
public sealed record RemoteTeleportHookActions(
|
|
Action<WeenieError> CancelMoveTo,
|
|
Action UnStick,
|
|
Action StopInterpolating,
|
|
Action UnConstrain,
|
|
Action NotifyTeleported,
|
|
Action ReportCollisionEnd);
|