fix(gameplay): reconcile wield ownership and target facing

Preserve PlayerDescription inventory/equipment ownership across authoritative manifest replacement, make weapon switching and combat/UI consumers read the same canonical object state, and carry the complete outbound player position frame across landblocks.

Route target-facing and mouse-look through the shared MovementManager and MotionInterpreter completion owner. Match retail input aggregation, toggle ordering, turn/sidestep remapping, per-axis hold keys, and synchronous movement publication without render-only heading state.

Initialize the live streaming origin from the first accepted canonical player Position, defer other projections until that origin exists, and retain logical entity identity through hydration.

Advance the project ledger from completed M2 to active M3, synchronize CLAUDE.md/AGENTS.md and durable memory, and record the next cast-lifecycle, spellbook/enchantment, and two-client portal gates.

Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
Erik 2026-07-15 08:19:23 +02:00
parent b26f84cc69
commit 7b7ffcd278
36 changed files with 3884 additions and 761 deletions

View file

@ -468,6 +468,37 @@ public sealed class ItemInteractionControllerTests
Assert.Equal(Player, h.Objects.Get(bow)!.ContainerId);
}
[Fact]
public void PreviouslyWieldedBow_AfterAuthoritativeUnwield_DoubleClickWieldsAgain()
{
var h = new Harness();
const uint bow = 0x50000B03u;
h.Objects.AddOrUpdate(new ClientObject
{
ObjectId = bow,
Name = "Bow",
Type = ItemType.MissileWeapon,
CombatUse = 1,
ValidLocations = EquipMask.MissileWeapon,
ContainerId = Player,
WielderId = Player,
CurrentlyEquippedLocation = EquipMask.MissileWeapon,
});
// Retail ServerSaysMoveItem clears _wielderID when this bow leaves
// the paper doll. This is the login-existing-bow regression: leaving
// the old player id here makes DetermineUseResult say "already wielded."
Assert.True(h.Objects.ApplyServerMove(
bow,
Pack,
newWielderId: 0u,
newSlot: 0));
Assert.True(h.Controller.ActivateItem(bow));
Assert.Equal(new[] { (bow, (uint)EquipMask.MissileWeapon) }, h.Wields);
}
[Fact]
public void WeaponReplacement_doesNotOverlapRequestsWhileAwaitingServer()
{
@ -534,10 +565,12 @@ public sealed class ItemInteractionControllerTests
Assert.True(h.Objects.WieldItemOptimistic(
bow, Player, EquipMask.MissileWeapon));
// Authoritative WieldObject + ConfirmWield completes AutoWield even
// Authoritative WieldObject completes AutoWield even
// though the object table still has another rollback record.
h.Objects.MoveItem(bow, Player, -1, EquipMask.MissileWeapon);
h.Objects.ConfirmWield(bow);
Assert.True(h.Objects.ApplyConfirmedServerWield(
bow,
Player,
EquipMask.MissileWeapon));
h.Now += 200;
Assert.True(h.Controller.ActivateItem(sword));
Assert.Equal(