feat(#184): Slice 3 — Setup-derived mover sphere for the remote de-overlap sweep
The per-tick remote de-overlap sweep used a hardcoded HUMAN collision sphere (0.48 m radius / 1.835 m capsule top) for EVERY creature, so large and small monsters de-overlapped at human spacing (register TS-46). Retail seeds the transition from the object's OWN Setup sphere list scaled by its wire ObjScale (CPhysicsObj::transition 0x00512dc0 -> init_sphere(GetNumSphere, GetSphere, m_scale); ObjScale from set_description 0x00514f40). Slice 3 (one call site, no signature change): before the Path B ResolveWithTransition call, read the creature's Setup-derived dims via the existing GetSetupCylinder helper -- (setup.Radius, setup.Height) x ObjScale, the same source the local player and the moveto/sticky radii already use, consistent with the spawn-time shadow registration's entScale -- and pass them as sphereRadius/sphereHeight. Fall back to the human capsule when GetSetupCylinder returns (0,0) for a shapeless / unresolvable Setup (a zero radius would degenerate the sweep). The player call site is unchanged (the player IS the human Setup). stepUp/stepDown stay 0.4 m (retail derives those from the Setup too -- an adjacent divergence left as-is). Big monsters now spread wider, small ones tighter -- the de-overlap distance tracks each creature's true radius. Test: RemoteDeOverlapMechanismTests.ConvergingLargeCreatures_DeOverlapWiderThanHuman (an R=0.9 pair settles ~1.8 m -- materially wider than the human 0.96 m contact -- proving the sweep de-overlaps at the radius it is given). Register: narrows TS-46 (remotes no longer human-dimmed; residual = the two-scalar reconstruction vs retail's sphere list, plus the 0.4 m step heights). Core 2621 / App 741 green. Research: workflow wf_e8306250-21b (3-agent read-only sweep: acdream data source / retail init_sphere reference / minimal-edit path). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
37a94e1fa4
commit
f51c1dffa5
3 changed files with 72 additions and 12 deletions
|
|
@ -10666,17 +10666,30 @@ public sealed class GameWindow : IDisposable
|
|||
// server-freshly-spawned at a valid Z anyway.
|
||||
if (rm.CellId != 0 && _physicsEngine.LandblockCount > 0)
|
||||
{
|
||||
// Sphere dims match local-player defaults (human Setup
|
||||
// 0x02000001: sphere radius 0.480, capsule top 1.835 =
|
||||
// Setup.Height; see the #137 TS-46 note at the
|
||||
// PlayerMovementController call). Good enough for
|
||||
// grounded humanoid remotes; can be setup-derived later
|
||||
// if creatures of wildly different sizes need different
|
||||
// collision profiles.
|
||||
// #184 Slice 3 (2026-07-07): Setup-DERIVED mover sphere so
|
||||
// creatures de-overlap at their TRUE radii (a big monster
|
||||
// spreads wider, a small one tighter), not the hardcoded
|
||||
// human 0.48/1.835. GetSetupCylinder returns (setup.Radius,
|
||||
// setup.Height) × ObjScale — the creature's own dat Setup
|
||||
// scaled by its wire ObjScale, the same source the local
|
||||
// player + moveto/sticky use, and consistent with the
|
||||
// spawn-time shadow registration's entScale. Retail seeds
|
||||
// the transition from the object's own Setup sphere list ×
|
||||
// m_scale (CPhysicsObj::transition 0x00512dc0 → init_sphere;
|
||||
// ObjScale from set_description 0x00514f40). This narrows
|
||||
// TS-46 (remotes no longer use human dims); the two-scalar
|
||||
// API is still a lossy stand-in for retail's full (≤2)
|
||||
// sphere list, and stepUp/stepDown stay 0.4 (retail derives
|
||||
// those from the Setup too — an adjacent divergence left as-is).
|
||||
// Fallback to the human capsule for a shapeless / unresolvable
|
||||
// Setup (GetSetupCylinder returns (0,0)); a zero radius would
|
||||
// degenerate the sweep.
|
||||
var (deR, deH) = GetSetupCylinder(serverGuid, ae.Entity);
|
||||
if (deR < 0.05f) { deR = 0.48f; deH = 1.835f; }
|
||||
var resolveResult = _physicsEngine.ResolveWithTransition(
|
||||
preIntegratePos, postIntegratePos, rm.CellId,
|
||||
sphereRadius: 0.48f,
|
||||
sphereHeight: 1.835f,
|
||||
sphereRadius: deR,
|
||||
sphereHeight: deH,
|
||||
stepUpHeight: 0.4f, // L.2.3a: retail human-scale, was 2.0f
|
||||
stepDownHeight: 0.4f, // L.2.3a: retail human-scale, was 0.04f
|
||||
// K-fix9 (2026-04-26): mirror the K-fix7 gate —
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue