feat(core): adopt retail's full WeenieError code table
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>
This commit is contained in:
parent
6530585309
commit
f27ad9ee43
6 changed files with 1149 additions and 149 deletions
|
|
@ -157,142 +157,9 @@ public enum MovementType
|
|||
TurnToHeading = 9,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// WeenieError-shaped codes returned by CMotionInterp methods. Values are
|
||||
/// the hex constants used directly in the decompiled C code.
|
||||
///
|
||||
/// <para>
|
||||
/// <b>R3-W1 renumber (closes J16-codes/A10).</b> Prior to this slice, the
|
||||
/// names were shuffled relative to retail's actual numeric semantics
|
||||
/// (<c>GeneralMovementFailure</c> was assigned 0x24 and used at the
|
||||
/// airborne-jump gate, but retail's 0x24 means "not grounded / no contact"
|
||||
/// and retail's 0x47 is the general-movement-failure code; 0x48 meant
|
||||
/// "cannot jump while in the air" here, but retail's 0x48 means "jump
|
||||
/// blocked by the CURRENT MOTION OR POSITION" — a blocklist check
|
||||
/// (<c>motion_allows_jump</c>), not an airborne check). Renumbered per the
|
||||
/// definitive, exhaustively-swept table in
|
||||
/// <c>docs/research/2026-07-02-r3-motioninterp/W0-pins.md</c> §A10 (19
|
||||
/// return sites + 1 store site over raw 304908-306277 + 300150-300540).
|
||||
/// These codes are LOCAL-ONLY — never serialized to the wire — so the
|
||||
/// renumber is safe (verified: no consumer outside
|
||||
/// <c>MotionInterpreter.cs</c> pattern-matches on the numeric value).
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public enum WeenieError : uint
|
||||
{
|
||||
/// <summary>0x00 — success.</summary>
|
||||
None = 0x00,
|
||||
/// <summary>
|
||||
/// 0x08 — no <c>physics_obj</c>. Sites (A10): StopCompletely @305214;
|
||||
/// DoInterpretedMotion @305579; StopInterpretedMotion @305639;
|
||||
/// StopMotion @305680; jump @305798; DoMotion @306165.
|
||||
/// </summary>
|
||||
NoPhysicsObject = 0x08,
|
||||
/// <summary>
|
||||
/// 0x0B — NoMotionInterpreter. R4-V1 addition (M12), per
|
||||
/// docs/research/2026-07-03-r4-moveto/r4-moveto-decomp.md §12 constants
|
||||
/// inventory (<c>8, 0xb, 0x36, 0x37, 0x38, 0x3d, 0x47</c>). ACE name;
|
||||
/// the retail sites that store this code were not individually
|
||||
/// extracted in the R4 pass (no MoveToManager consumer in this slice —
|
||||
/// V1 pins the numeric value only).
|
||||
/// </summary>
|
||||
NoMotionInterpreter = 0x0B,
|
||||
/// <summary>
|
||||
/// 0x24 — not grounded / no contact. Sites (A10):
|
||||
/// <c>jump_is_allowed</c> @305570 (gravity-active creature without
|
||||
/// Contact+OnWalkable; also the <c>physics_obj == null</c> case, which
|
||||
/// falls out to this same code per the A10 note — NOT 8);
|
||||
/// <c>DoInterpretedMotion</c> @305622-305623 (action-class motion
|
||||
/// blocked by <c>contact_allows_move</c>).
|
||||
/// </summary>
|
||||
NotGrounded = 0x24,
|
||||
/// <summary>
|
||||
/// 0x3f — Crouch (0x41000012) rejected while in combat stance. Site:
|
||||
/// DoMotion @306196.
|
||||
/// </summary>
|
||||
CrouchInCombatStance = 0x3f,
|
||||
/// <summary>
|
||||
/// 0x40 — Sitting (0x41000013) rejected while in combat stance. Site:
|
||||
/// DoMotion @306199.
|
||||
/// </summary>
|
||||
SitInCombatStance = 0x40,
|
||||
/// <summary>
|
||||
/// 0x41 — Sleeping (0x41000014) rejected while in combat stance. Site:
|
||||
/// DoMotion @306202.
|
||||
/// </summary>
|
||||
SleepInCombatStance = 0x41,
|
||||
/// <summary>
|
||||
/// 0x42 — <c>motion & 0x2000000</c> (the chat-emote bit) rejected
|
||||
/// outside NonCombat (0x8000003d). Site: DoMotion @306205.
|
||||
/// </summary>
|
||||
ChatEmoteOutsideNonCombat = 0x42,
|
||||
/// <summary>
|
||||
/// 0x36 — ActionCancelled. R4-V1 addition (M12). Site:
|
||||
/// <c>MoveToManager::PerformMovement</c> (r4-moveto-decomp.md §3a
|
||||
/// @0052a901) — every new moveto cancels the previous one with this
|
||||
/// code before dispatching; also <c>CPhysicsObj::interrupt_current_movement</c>
|
||||
/// → <c>MovementManager::CancelMoveTo(0x36)</c> (§9e — the TS-36 cancel
|
||||
/// entry). Per §7c, <c>MoveToManager::CancelMoveTo</c>'s WeenieError arg
|
||||
/// is NEVER READ in this build's body — kept for parity/logging only.
|
||||
/// </summary>
|
||||
ActionCancelled = 0x36,
|
||||
/// <summary>
|
||||
/// 0x37 — ObjectGone. R4-V1 addition (M12). Site:
|
||||
/// <c>MoveToManager::HandleUpdateTarget</c> (§6d @307866-307867) — a
|
||||
/// RETARGET delivery arrives with a non-OK target status (the target
|
||||
/// object was already being tracked, then went away).
|
||||
/// </summary>
|
||||
ObjectGone = 0x37,
|
||||
/// <summary>
|
||||
/// 0x38 — NoObject. R4-V1 addition (M12). Site:
|
||||
/// <c>MoveToManager::HandleUpdateTarget</c> (§6d @307857-307858) — the
|
||||
/// FIRST target callback arrives with a non-OK status (the target never
|
||||
/// resolved in the first place).
|
||||
/// </summary>
|
||||
NoObject = 0x38,
|
||||
/// <summary>
|
||||
/// 0x45 — action-queue depth cap: an action-class motion (bit
|
||||
/// 0x10000000) with <c>GetNumActions() >= 6</c> pending. Site:
|
||||
/// DoMotion @306209.
|
||||
/// </summary>
|
||||
ActionDepthExceeded = 0x45,
|
||||
/// <summary>
|
||||
/// 0x47 — general movement failure. Sites (A10):
|
||||
/// <c>jump_is_allowed</c> @305525 (<c>IsFullyConstrained</c>);
|
||||
/// @305549+305556 (<c>JumpStaminaCost</c> refusal);
|
||||
/// <c>CMotionInterp::PerformMovement</c> @306227 (dispatch type-1 > 4);
|
||||
/// <c>MovementManager::PerformMovement</c> @300201 (dispatch type-1 > 8).
|
||||
/// </summary>
|
||||
GeneralMovementFailure = 0x47,
|
||||
/// <summary>
|
||||
/// 0x48 — jump BLOCKED by the current motion or position (A1: the
|
||||
/// <c>motion_allows_jump</c> literal-range blocklist — NOT an airborne
|
||||
/// check; airborne is 0x24). Sites (A10):
|
||||
/// <c>motion_allows_jump</c> @304930; <c>jump_charge_is_allowed</c>
|
||||
/// @304948 (Fallen or Crouch..Sleeping); <c>charge_jump</c> @305459
|
||||
/// (same predicate); STORED (not returned) as the queue node's
|
||||
/// <c>jump_error_code</c> in <c>DoInterpretedMotion</c> @305605 when
|
||||
/// <c>disable_jump_during_link</c> is set.
|
||||
/// </summary>
|
||||
YouCantJumpFromThisPosition = 0x48,
|
||||
/// <summary>
|
||||
/// 0x49 — the weenie's <c>CanJump(jump_extent)</c> virtual refused
|
||||
/// (e.g. stamina/burden gate). Sites: <c>jump_charge_is_allowed</c>
|
||||
/// @304941; <c>charge_jump</c> @305454.
|
||||
/// </summary>
|
||||
CantJumpLoadedDown = 0x49,
|
||||
/// <summary>
|
||||
/// 0x3D — YouChargedTooFar. R4-V1 addition (M12). Site:
|
||||
/// <c>MoveToManager::HandleMoveToPosition</c> Phase 2 arrival check
|
||||
/// (r4-moveto-decomp.md §6b) — the <c>fail_distance</c> progress gate
|
||||
/// exceeded (<c>CheckProgressMade</c> §5b failing for >1s AND the
|
||||
/// mover overshot <c>fail_distance</c>). NOTE: numerically out of A10's
|
||||
/// increasing order (0x3D < 0x3F/0x40/0x41/0x42/0x45) because it was
|
||||
/// not part of the CMotionInterp jump-family sweep this code sits
|
||||
/// beside — it belongs to the MoveToManager family instead (§7c, §12).
|
||||
/// </summary>
|
||||
YouChargedTooFar = 0x3D,
|
||||
}
|
||||
// The WeenieError catalog moved to its own file on 2026-07-29 when it grew
|
||||
// from the 16-member CMotionInterp/MoveToManager subset to retail's full
|
||||
// 372-code table: src/AcDream.Core/Physics/WeenieError.cs (same namespace).
|
||||
|
||||
// ── Motion state structs ───────────────────────────────────────────────────────
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue