Leviathan  0.8.0.0
Leviathan game engine
WorldNetworkSettings.h
Go to the documentation of this file.
1 // Leviathan Game Engine
2 // Copyright (c) 2012-2018 Henri Hyyryläinen
3 #pragma once
4 // ------------------------------------ //
5 
6 namespace Leviathan {
7 
9 
12 
15  {
16  WorldNetworkSettings settings;
17  settings.IsAuthoritative = true;
18  settings.AutoCreateNetworkComponents = true;
19  settings.DoInterpolation = false;
20 
21  return settings;
22  }
23 
26  {
27  WorldNetworkSettings settings;
28  settings.IsAuthoritative = false;
29  settings.AutoCreateNetworkComponents = true;
30  settings.DoInterpolation = true;
31 
32  return settings;
33  }
34 
38  {
39  WorldNetworkSettings settings;
40  settings.IsAuthoritative = true;
41  settings.AutoCreateNetworkComponents = true;
42  settings.DoInterpolation = true;
43 
44  return settings;
45  }
46 
50  {
51  WorldNetworkSettings settings;
52  settings.IsAuthoritative = true;
53  settings.AutoCreateNetworkComponents = false;
54  settings.DoInterpolation = false;
55 
56  return settings;
57  }
58 
60  bool IsAuthoritative = false;
61 
65 
67  bool DoInterpolation = true;
68 };
69 
70 
71 } // namespace Leviathan
static WorldNetworkSettings GetSettingsForServer()
Creates settings for a dedicated server.
static WorldNetworkSettings GetSettingsForHybrid()
Creates settings for acting both as a server and having a local player (listen server)
static WorldNetworkSettings GetSettingsForSinglePlayer()
Creates settings for worlds that have no interest in networking (singleplayer only)
bool IsAuthoritative
This is true on the server.
static WorldNetworkSettings GetSettingsForClient()
Creates settings for a client.
WorldNetworkSettings()
Creates default settings for not doing any networking.
The access mask controls which registered functions and classes a script sees.
Definition: GameModule.h:12
bool DoInterpolation
Enables clientside interpolation functions.