private byte GetSpawnIndex(uint actorId) { // local actor always has an index of 0 if (actorId == Id) { return(0); } if (!spawnIndexLookup.TryGetValue(actorId, out byte index)) { index = spawnIndex.DequeueValue(); spawnIndexLookup.Add(actorId, index); } return(index); }
public static ulong GetNewCharacterId() { return(characterId.DequeueValue()); }