mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-01-11 07:48:36 -05:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
40 lines
1.3 KiB
C#
40 lines
1.3 KiB
C#
namespace Sandbox;
|
|
|
|
/// <summary>
|
|
/// A class that holds all configured networking settings for a game.
|
|
/// This is serialized as a config and shared from the server to the client.
|
|
/// </summary>
|
|
[Expose]
|
|
public class NetworkingSettings : ConfigData
|
|
{
|
|
/// <summary>
|
|
/// Whether to disband the game lobby when the host leaves.
|
|
/// </summary>
|
|
public bool DestroyLobbyWhenHostLeaves { get; set; }
|
|
|
|
/// <summary>
|
|
/// Whether to periodically switch to the best host candidate. Candidates are
|
|
/// scored based on their average ping and connection quality to all other peers.
|
|
/// </summary>
|
|
public bool AutoSwitchToBestHost { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// By default can clients create objects. This can be changed per connection after join.
|
|
/// </summary>
|
|
[Title( "Client Object Spawning" )]
|
|
public bool ClientsCanSpawnObjects { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// By default can clients refresh objects. This can be changed per connection after join.
|
|
/// </summary>
|
|
[Title( "Client Object Refreshing" )]
|
|
public bool ClientsCanRefreshObjects { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// The frequency at which the network system will send updates to clients. Higher is better but
|
|
/// you probably want to stay in the 10-60 range.
|
|
/// </summary>
|
|
public float UpdateRate { get; set; } = 30;
|
|
|
|
}
|