Partial Player class file that declares two synchronized references: CameraTarget, an NPC that the death camera should focus on and is host-to-client authoritative; and Doob, a player companion entity synced to clients.
using Sandbox;
namespace BrickJam;
public sealed partial class Player
{
/// <summary>An NPC currently focusing the death camera on the player (set while being caught/killed).
/// FromHost: written host-side by <see cref="NPC.CatchPlayer"/>, so a client victim only receives it
/// (and gets the look-at-killer camera) when it's host-authoritative.</summary>
[Sync( SyncFlags.FromHost )] public NPC CameraTarget { get; set; }
/// <summary>The player's "Cartoony Sidekick" companion, if any.</summary>
[Sync] public Doob Doob { get; set; }
}