Polyphase Game Engine
Loading...
Searching...
No Matches
NetworkManager.cpp File Reference
#include "NetworkManager.h"
#include "Engine.h"
#include "Log.h"
#include "Nodes/Node.h"
#include "Assets/Scene.h"
#include "World.h"
#include "Profiler.h"
#include "Maths.h"
#include "Script.h"
#include "LuaBindings/Network_Lua.h"
#include "Network/NetPlatformEpic.h"
#include "Network/NetPlatformSteam.h"

Macros

#define DEBUG_MSG_STATS   0
 
#define DEBUG_NETWORK_CONDITIONS   0
 
#define NET_MSG_CASE(Type)
 
#define NET_MSG_STATIC_CASE(Type)
 

Functions

bool NetIsClient ()
 
bool NetIsServer ()
 
bool NetIsLocal ()
 
bool NetIsAuthority ()
 
NetHostId NetGetHostId ()
 
template<typename T >
bool ReplicateData (std::vector< T > &repData, NetMsgReplicate &msg, NetId hostId, bool force, bool reliable)
 

Macro Definition Documentation

◆ DEBUG_MSG_STATS

#define DEBUG_MSG_STATS   0

◆ DEBUG_NETWORK_CONDITIONS

#define DEBUG_NETWORK_CONDITIONS   0

◆ NET_MSG_CASE

#define NET_MSG_CASE (   Type)
Value:
case NetMsgType::Type: \
{ \
/*LogDebug("Recv NetMsg %s", #Type);*/ \
NetMsg##Type netMsg; \
netMsg.Read(stream); \
netMsg.Execute(sender); \
msgHandled = true; \
break; \
}
Definition NetMsg.h:42
virtual void Read(Stream &stream)
Definition NetMsg.cpp:17

◆ NET_MSG_STATIC_CASE

#define NET_MSG_STATIC_CASE (   Type)
Value:
case NetMsgType::Type: \
{ \
/*LogDebug("Recv NetMsg %s", #Type);*/ \
sMsg##Type.Read(stream); \
sMsg##Type.Execute(sender); \
msgHandled = true; \
break; \
}

Function Documentation

◆ NetGetHostId()

NetHostId NetGetHostId ( )

◆ NetIsAuthority()

bool NetIsAuthority ( )

◆ NetIsClient()

bool NetIsClient ( )

◆ NetIsLocal()

bool NetIsLocal ( )

◆ NetIsServer()

bool NetIsServer ( )

◆ ReplicateData()

template<typename T >
bool ReplicateData ( std::vector< T > &  repData,
NetMsgReplicate msg,
NetId  hostId,
bool  force,
bool  reliable 
)