Nebula
Protocol

EntityDespawnMsg

Carries the entity despawn protocol message.

generated from the sources
public struct EntityDespawnMsg

Carries the entity despawn protocol message.

Fields

NetId

public ulong NetId;

Epoch

public uint Epoch;

ViewSeq

public ushort ViewSeq;

Gateway -> client: the view this despawn ends (see EntitySpawnMsg.ViewSeq). A client drops a despawn older than the view it currently holds, so a late leave cannot kill a re-entered replica. Workers send 0.

TakesRiders

public bool TakesRiders;

Worker -> worker (MsgId.GhostDespawn): the entity is a carrier that left the world together with what rides in it, because the container it was in was emptied (NebulaWorker.EmptyContainer). A worker holding the carrier as a ghost despawns the riders it owns aboard it the same way, instead of putting them down in the box around it (protocol 18, trailing and optional; written only when true; docs/dynamic-worlds.md D5). False everywhere else, which keeps the riders.

CarrierKey

public string CarrierKey;

With TakesRiders: the carrier's PersistentEntity.Key, empty when it is not persistent. A ghost does not know its entity's key, and a rider saved aboard it must name the carrier's real record so that it is restored with the carrier.

Methods

Write

public void Write(NetworkWriter w, MsgId id);

Read

public static EntityDespawnMsg Read(NetworkReader r);

On this page