Nebula
Loading...
Searching...
No Matches
multiplayerfeatureunit.cc File Reference
#include "application/stdneb.h"
#include "basegamefeature/managers/timemanager.h"
#include "game/api.h"
#include "game/featureunit.h"
#include "multiplayerfeatureunit.h"
#include "game/world.h"
#include "imgui.h"
#include "GameNetworkingSockets/steam/steamnetworkingsockets.h"
#include "GameNetworkingSockets/steam/isteamnetworkingutils.h"
#include "multiplayer/client/basemultiplayerclient.h"
#include "multiplayer/components/multiplayer.h"
#include "game/processor.h"
#include "io/jsonreader.h"
#include "io/jsonwriter.h"
#include "core/cvar.h"

Namespaces

namespace  Multiplayer
 
namespace  IO
 Instances of wrapped stream classes.
 

Functions

 Multiplayer::__ImplementClass (Multiplayer::MultiplayerFeatureUnit, 'MPFU', Game::FeatureUnit)
 
 Multiplayer::__ImplementSingleton (MultiplayerFeatureUnit)
 
static void Multiplayer::DebugOutput (ESteamNetworkingSocketsDebugOutputType eType, const char *pszMsg)
 
static void Multiplayer::InitSteamDatagramConnectionSockets ()
 
static void Multiplayer::ShutdownSteamDatagramConnectionSockets ()
 
void Multiplayer::RefreshConfigCVars (bool force=false)
 
template<>
void IO::JsonReader::Get< Math::Extrapolator< Math::vec3 > > (Math::Extrapolator< Math::vec3 > &ret, const char *attr)
 
template<>
void IO::JsonWriter::Add< Math::Extrapolator< Math::vec3 > > (Math::Extrapolator< Math::vec3 > const &value, Util::String const &attr)
 

Variables

SteamNetworkingMicroseconds Multiplayer::logTimeZero
 
Core::CVarMultiplayer::net_fake_packet_lag_send = Core::CVarCreate(Core::CVarType::CVar_Int, "net_fake_packet_lag_send", "0", "Delay all outbound packets by N ms")
 
Core::CVarMultiplayer::net_fake_packet_lag_recv = Core::CVarCreate(Core::CVarType::CVar_Int, "net_fake_packet_lag_recv", "0", "Delay all inbound packets by N ms")
 
Core::CVarMultiplayer::net_fake_packet_loss_send = Core::CVarCreate(Core::CVarType::CVar_Int, "net_fake_packet_loss_send", "0", "[0--100] Randomly discard N percent of packets sent")
 
Core::CVarMultiplayer::net_fake_packet_loss_recv = Core::CVarCreate(Core::CVarType::CVar_Int, "net_fake_packet_loss_recv", "0", "[0--100] Randomly discard N percent of packets received")
 
Core::CVarMultiplayer::net_fake_packet_jitter_send_avg = Core::CVarCreate(Core::CVarType::CVar_Int, "net_fake_packet_jitter_send_avg", "0", "A random jitter time is generated using an exponential distribution using this value as the mean (ms). The default is zero, which disables random jitter.")
 
Core::CVarMultiplayer::net_fake_packet_jitter_send_pct = Core::CVarCreate(Core::CVarType::CVar_Int, "net_fake_packet_jitter_send_pct", "0", "Odds (0-100) that a random jitter value for the packet will be generated. Otherwise, a jitter value of zero is used, and the packet will only be delayed by the jitter system if necessary to retain order, due to the jitter of a previous packet.")
 
Core::CVarMultiplayer::net_fake_packet_jitter_send_max = Core::CVarCreate(Core::CVarType::CVar_Int, "net_fake_packet_jitter_send_max", "0", "Limit the random jitter time to this value (ms). Default 0.")
 
Core::CVarMultiplayer::net_fake_packet_jitter_recv_avg = Core::CVarCreate(Core::CVarType::CVar_Int, "net_fake_packet_jitter_recv_avg", "0", "A random jitter time is generated using an exponential distribution using this value as the mean (ms). The default is zero, which disables random jitter.")
 
Core::CVarMultiplayer::net_fake_packet_jitter_recv_pct = Core::CVarCreate(Core::CVarType::CVar_Int, "net_fake_packet_jitter_recv_pct", "0", "Odds (0-100) that a random jitter value for the packet will be generated. Otherwise, a jitter value of zero is used, and the packet will only be delayed by the jitter system if necessary to retain order, due to the jitter of a previous packet.")
 
Core::CVarMultiplayer::net_fake_packet_jitter_recv_max = Core::CVarCreate(Core::CVarType::CVar_Int, "net_fake_packet_jitter_recv_max", "0", "Limit the random jitter time to this value (ms). Default 0.")
 
Core::CVarMultiplayer::net_fake_packet_reorder_send = Core::CVarCreate(Core::CVarType::CVar_Int, "net_fake_packet_reorder_send", "0", "0-100 Percentage of packets to add additional delay to. If other packet(s) are sent/received within this delay window (that doesn't also randomly receive the same extra delay), then the packets become reordered.")
 
Core::CVarMultiplayer::net_fake_packet_reorder_recv = Core::CVarCreate(Core::CVarType::CVar_Int, "net_fake_packet_reorder_recv", "0", "0-100 Percentage of packets to add additional delay to. If other packet(s) are sent/received within this delay window (that doesn't also randomly receive the same extra delay), then the packets become reordered.")