Leviathan  0.8.0.0
Leviathan game engine
Leviathan::WorldNetworkSettings Struct Reference

#include <WorldNetworkSettings.h>

Public Member Functions

 WorldNetworkSettings ()
 Creates default settings for not doing any networking. More...
 

Static Public Member Functions

static WorldNetworkSettings GetSettingsForServer ()
 Creates settings for a dedicated server. More...
 
static WorldNetworkSettings GetSettingsForClient ()
 Creates settings for a client. More...
 
static WorldNetworkSettings GetSettingsForHybrid ()
 Creates settings for acting both as a server and having a local player (listen server) More...
 
static WorldNetworkSettings GetSettingsForSinglePlayer ()
 Creates settings for worlds that have no interest in networking (singleplayer only) More...
 

Public Attributes

bool IsAuthoritative = false
 This is true on the server. More...
 
bool AutoCreateNetworkComponents = false
 
bool DoInterpolation = true
 Enables clientside interpolation functions. More...
 

Detailed Description

Definition at line 8 of file WorldNetworkSettings.h.

Constructor & Destructor Documentation

◆ WorldNetworkSettings()

Leviathan::WorldNetworkSettings::WorldNetworkSettings ( )
inline

Creates default settings for not doing any networking.

Definition at line 11 of file WorldNetworkSettings.h.

11 {}

Member Function Documentation

◆ GetSettingsForClient()

static WorldNetworkSettings Leviathan::WorldNetworkSettings::GetSettingsForClient ( )
inlinestatic

Creates settings for a client.

Definition at line 25 of file WorldNetworkSettings.h.

26  {
27  WorldNetworkSettings settings;
28  settings.IsAuthoritative = false;
29  settings.AutoCreateNetworkComponents = true;
30  settings.DoInterpolation = true;
31 
32  return settings;
33  }
WorldNetworkSettings()
Creates default settings for not doing any networking.

◆ GetSettingsForHybrid()

static WorldNetworkSettings Leviathan::WorldNetworkSettings::GetSettingsForHybrid ( )
inlinestatic

Creates settings for acting both as a server and having a local player (listen server)

Definition at line 37 of file WorldNetworkSettings.h.

38  {
39  WorldNetworkSettings settings;
40  settings.IsAuthoritative = true;
41  settings.AutoCreateNetworkComponents = true;
42  settings.DoInterpolation = true;
43 
44  return settings;
45  }
WorldNetworkSettings()
Creates default settings for not doing any networking.

◆ GetSettingsForServer()

static WorldNetworkSettings Leviathan::WorldNetworkSettings::GetSettingsForServer ( )
inlinestatic

Creates settings for a dedicated server.

Definition at line 14 of file WorldNetworkSettings.h.

15  {
16  WorldNetworkSettings settings;
17  settings.IsAuthoritative = true;
18  settings.AutoCreateNetworkComponents = true;
19  settings.DoInterpolation = false;
20 
21  return settings;
22  }
WorldNetworkSettings()
Creates default settings for not doing any networking.

◆ GetSettingsForSinglePlayer()

static WorldNetworkSettings Leviathan::WorldNetworkSettings::GetSettingsForSinglePlayer ( )
inlinestatic

Creates settings for worlds that have no interest in networking (singleplayer only)

Definition at line 49 of file WorldNetworkSettings.h.

50  {
51  WorldNetworkSettings settings;
52  settings.IsAuthoritative = true;
53  settings.AutoCreateNetworkComponents = false;
54  settings.DoInterpolation = false;
55 
56  return settings;
57  }
WorldNetworkSettings()
Creates default settings for not doing any networking.

Member Data Documentation

◆ AutoCreateNetworkComponents

bool Leviathan::WorldNetworkSettings::AutoCreateNetworkComponents = false

This controls if the World automatically creates things needed for sending updates if IsAuthoritative and receiving updates otherwise

Definition at line 64 of file WorldNetworkSettings.h.

◆ DoInterpolation

bool Leviathan::WorldNetworkSettings::DoInterpolation = true

Enables clientside interpolation functions.

Definition at line 67 of file WorldNetworkSettings.h.

◆ IsAuthoritative

bool Leviathan::WorldNetworkSettings::IsAuthoritative = false

This is true on the server.

Definition at line 60 of file WorldNetworkSettings.h.


The documentation for this struct was generated from the following file: