Component placed on a player corpse that marks it as a death camera target. Stores the owning Connection (synced from host) and a creation timestamp, and destroys the object after 60 seconds when the server setting to keep corpses is off.
public partial class DeathCameraTarget : Component
{
[Sync( SyncFlags.FromHost )]
public Connection Connection { get; set; }
public DateTime Created { get; set; }
protected override void OnEnabled()
{
if ( !ServerSettings.KeepPlayerCorpses )
Invoke( 60.0f, GameObject.Destroy );
}
}