refactor(world): canonicalize live physics host ownership
This commit is contained in:
parent
5882b308c1
commit
fcb66198fc
21 changed files with 1546 additions and 323 deletions
|
|
@ -62,6 +62,9 @@ internal sealed class R5Host : IPhysicsObjHost
|
|||
public IPhysicsObjHost? GetObjectA(uint id)
|
||||
=> World.TryGetValue(id, out var h) && h.Resolvable ? h : null;
|
||||
|
||||
public IPhysicsObjHost? GetRelationshipTarget(uint objectId) =>
|
||||
_targetManager?.GetRelationshipTarget(objectId);
|
||||
|
||||
public void HandleUpdateTarget(TargetInfo info)
|
||||
{
|
||||
HandleUpdateTargetCalls.Add(info);
|
||||
|
|
@ -79,12 +82,14 @@ internal sealed class R5Host : IPhysicsObjHost
|
|||
|
||||
public void ClearTarget() => _targetManager?.ClearTarget();
|
||||
|
||||
public void ReceiveTargetUpdate(TargetInfo info) => _targetManager?.ReceiveUpdate(info);
|
||||
public void ReceiveTargetUpdate(TargetInfo info, IPhysicsObjHost sender) =>
|
||||
_targetManager?.ReceiveUpdate(info, sender);
|
||||
|
||||
public void AddVoyeur(uint watcherId, float radius, double quantum)
|
||||
=> TargetManager.AddVoyeur(watcherId, radius, quantum);
|
||||
public void AddVoyeur(IPhysicsObjHost watcher, float radius, double quantum)
|
||||
=> TargetManager.AddVoyeur(watcher, radius, quantum);
|
||||
|
||||
public void RemoveVoyeur(uint watcherId) => _targetManager?.RemoveVoyeur(watcherId);
|
||||
public void RemoveVoyeur(uint watcherId, IPhysicsObjHost expectedWatcher) =>
|
||||
_targetManager?.RemoveVoyeur(watcherId, expectedWatcher);
|
||||
|
||||
// ── test helpers ───────────────────────────────────────────────────────
|
||||
public void SetOrigin(Vector3 origin)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue