feat(runtime): own SetPosition collision reports

This commit is contained in:
Erik 2026-08-01 00:15:11 +02:00
parent ec627c13a2
commit 237d1184d2
19 changed files with 3744 additions and 103 deletions

View file

@ -1563,6 +1563,32 @@ public sealed class ShadowObjectRegistry
internal bool HasLogicalOwner(uint entityId) =>
_entityReg.ContainsKey(entityId);
/// <summary>
/// Returns the exact collision identity consumed by retail
/// <c>CPhysicsObj::track_object_collision</c>. Reporting must classify
/// an encountered object from the same retained shadow registration that
/// produced the collision; presence of an entity id alone is not enough
/// to infer either a static/environment collision or physics state.
/// </summary>
internal bool TryGetCollisionOwner(
uint entityId,
out uint physicsState,
out bool isStatic)
{
if (_entityReg.TryGetValue(
entityId,
out RegistrationRecord? registration))
{
physicsState = registration.State;
isStatic = registration.IsStatic;
return true;
}
physicsState = 0u;
isStatic = false;
return false;
}
public int PrefixOwnerSlotCapacityForDiagnostics(uint landblockId) =>
_prefixOwnerSlots.TryGetValue(
landblockId & 0xFFFF0000u,