Vixen
02b45cc4
csharp
public readonly record struct PlayerId

Who, as the session numbers them.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Not a ConnectionId, and the difference is the whole reason this type exists. A connection is a socket, or a slot in the local transport's table, and it ends the moment a train goes into a tunnel. A player is who was holding it: the same PlayerId comes back on the other side of the tunnel with their entities, their ownership and their score, because the reconnect token they present says so.

Everything a game cares about is keyed by player. Everything the transport cares about is keyed by connection. Conflating them is how "reconnect support" becomes a rewrite instead of a feature.

Fields and properties (3)

  • public uint Value

    The number. Zero is None.

  • public static PlayerId None

    Nobody.

  • public bool IsValid

    Whether this names a player at all.

Methods (2)

  • public PlayerId(uint Value)

    Who, as the session numbers them.

  • public override string ToString()

    Returns the fully qualified type name of this instance.

Used by (90, showing 40)

  • ArenaMultiplayer
  • FighterMultiplayer
  • GameClientMultiplayer
  • GameServerMultiplayer
  • PeerVoiceChat
  • RelayVoiceChat
  • SliceResolverNetworkSoak
  • SoakNetworkSoak
  • VoiceLinkVoiceChat
  • AllNetworkedSourceVixen.Net
  • AwaitableRpcTestsVixen.Net.Tests
  • BandwidthLedgerVixen.Net
  • BitExactnessTestsVixen.Net.Tests
  • BroadcastRouterVixen.Net
  • BroadcastTestsVixen.Net.Tests
  • DeltaTestsVixen.Net.Tests
  • DiagnosticsTestsVixen.Net.Tests
  • DistanceReplicationRateVixen.Net
  • DroppingTransportVixen.Net.Fuzz
  • ExplicitInterestRuleVixen.Net
  • FixedObserversVixen.Net.Tests
  • GeneratedTurretVixen.Net.Generators.Tests
  • HandshakeTargetVixen.Net.Fuzz
  • IInterestResolverVixen.Net
  • IInterestRuleVixen.Net
  • IInterestSourceVixen.Net
  • IReplicationRateVixen.Net
  • IRpcObserversVixen.Net
  • IRpcTransportVixen.Net
  • ISessionMessageHandlerVixen.Net
  • InterestChainVixen.Net
  • InterestGridVixen.Net
  • InterestTestsVixen.Net.Tests
  • LocalPlayerSystemVixen.Net.Engine
  • LocalPlayerSystemTestsVixen.Net.Engine.Tests
  • LoopbackVixen.Net.Tests
  • MessageRecorderVixen.Net.Tests
  • NetworkAnimatorApplySystemVixen.Net.Animation
  • NetworkAnimatorCaptureSystemVixen.Net.Animation
  • NetworkAnimatorTestsVixen.Net.Animation.Tests