Skip to content

CVR Object Sync

Adds a lightweight network sync for a GameObject that isn’t a CVR Spawnable. At runtime a CVRSharedPhysicsController is added if missing, the object registers with CVR_ObjectSyncManager, and a scheduled send job runs at MetaPort.SystemTickRate Hz. When a CVRPickupObject is attached, grabs and drops force a sync.

string. Stable identifier for this sync object. Used by CVRSyncHelper.MoveObject to route updates.

List<CVRObjectSyncTask>. Additional data bundled into the initial sync payload sent to new joiners. Each task has:

  • typeTaskType enum:
    • Position — write the bound Transform’s position.
    • Rotation — write the bound Transform’s euler angles.
    • ActivityState — write the bound Transform.gameObject.activeSelf.
    • PickupOwner — carry the current pickup owner id.
    • AnimatorParameter — write an Animator parameter. intVal selects the parameter index.
    • AnimatorAnimationProgress — write an animation’s current progress.
    • VariableBufferValue — write a CVRVariableBuffer.value.
  • component — the Transform, Animator, or CVRVariableBuffer the task reads from.
  • intVal — animator parameter index (for AnimatorParameter), or other task-specific integer.
  • syncOwner, syncedBy — owner id strings filled by incoming packets.
  • SyncedByMe — true when this client is currently authoritative.
  • SyncTypeint matching the CVRSpawnable syncType scheme (0: idle, 1: grabbed, 2: attachment, 3: telepathic grab).
  • isPhysicsSynced — true while physics are being driven by the owner.
  • ForceUpdate() / ForceUpdate(int syncType) — force a send next tick.
  • sendUpdate() — called by the scheduled job; sends via CVRSyncHelper.MoveObject.
  • receiveNetworkData(position, rotation, active, syncedBy, syncType, additionalData) — inbound mid-instance update.
  • receiveNetworkDataJoin(...) — initial position/rotation for a new joiner; does not interpolate.
  • getInitialObject() / getInitialTaskData() — produce the serialisable payload for new joiners.

CVR-GameFiles/ABI.CCK.Components/CVRObjectSync.cs, CVR-GameFiles/ABI.CCK.Components/CVRObjectSyncTask.cs