mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
* Only run '_DownloadPlaylists_f()' in the main thread, schedule for next frame if we aren't in the main thread. (this should fix crash cases related to disconnecting from the game). * Locked read/write to CBrowser members (thread for obtaining the server list is detached, but once the 'slow' post operation in this thread is complete, mutex lock is acquired (locking the render thread if the browser is active) to set the string members of CBrowser, this operation is very fast as we only set the string and the color after the http post operation (this never caused a crash, but the behavior without any lock mechanism is technically undefined regardless). * Obtain the host name dynamically from the ConVar 'pylon_matchmaking_hostname' (atomic operation). Initial approach was deleting the whole master server pointer just to construct a new httpclient object..
38 lines
675 B
C
38 lines
675 B
C
#pragma once
|
|
|
|
|
|
struct NetGameMod_t
|
|
{
|
|
string m_svPackage;
|
|
int m_nNumber;
|
|
bool m_bRequired;
|
|
string m_svDownloadLink;
|
|
|
|
//NLOHMANN_DEFINE_TYPE_INTRUSIVE(NetGameMod_t, m_svPackage, m_nNumber, m_bRequired, m_svDownloadLink)
|
|
};
|
|
|
|
struct NetGameServer_t
|
|
{
|
|
string m_svHostName;
|
|
string m_svDescription;
|
|
bool m_bHidden;
|
|
|
|
string m_svHostMap = "mp_lobby";
|
|
string m_svPlaylist = "dev_default";
|
|
|
|
string m_svIpAddress;
|
|
string m_svGamePort;
|
|
string m_svEncryptionKey;
|
|
|
|
string m_svRemoteChecksum;
|
|
string m_svSDKVersion;
|
|
|
|
string m_svPlayerCount;
|
|
string m_svMaxPlayers;
|
|
int64_t m_nTimeStamp = -1;
|
|
|
|
string m_svPublicRef;
|
|
string m_svCachedID;
|
|
|
|
//vector<NetGameMod_t> m_vMods;
|
|
}; |