diff options
author | GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> | 2022-09-08 00:16:19 +0200 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-09-14 12:55:09 +0200 |
commit | 6b84f1d4e37dfcca2e48acd5a3968707c23d568b (patch) | |
tree | 24cb7c1c2ea0aaad52fb50f19890583be686ca0c /NorthstarDLL/scriptserverbrowser.cpp | |
parent | df4e37f4d9f81b3956a54cb52b21dd669c909b1d (diff) | |
download | NorthstarLauncher-6b84f1d4e37dfcca2e48acd5a3968707c23d568b.tar.gz NorthstarLauncher-6b84f1d4e37dfcca2e48acd5a3968707c23d568b.zip |
Rename some members of MasterServerManager (#266)v1.9.7-rc1
This is basically 9ab7c43c34183915273cc8b5ccedd72568249b27 from refactor but without the debug build crash fix as that was introduced in a commit in refactor not present on main
Co-authored-by: BobTheBob <32057864+BobTheBob9@users.noreply.github.com>
Diffstat (limited to 'NorthstarDLL/scriptserverbrowser.cpp')
-rw-r--r-- | NorthstarDLL/scriptserverbrowser.cpp | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/NorthstarDLL/scriptserverbrowser.cpp b/NorthstarDLL/scriptserverbrowser.cpp index aa5b0e17..2a366b3f 100644 --- a/NorthstarDLL/scriptserverbrowser.cpp +++ b/NorthstarDLL/scriptserverbrowser.cpp @@ -24,21 +24,21 @@ SQRESULT SQ_RequestServerList(void* sqvm) // bool function NSIsRequestingServerList() SQRESULT SQ_IsRequestingServerList(void* sqvm) { - ClientSq_pushbool(sqvm, g_MasterServerManager->m_scriptRequestingServerList); + ClientSq_pushbool(sqvm, g_MasterServerManager->m_bScriptRequestingServerList); return SQRESULT_NOTNULL; } // bool function NSMasterServerConnectionSuccessful() SQRESULT SQ_MasterServerConnectionSuccessful(void* sqvm) { - ClientSq_pushbool(sqvm, g_MasterServerManager->m_successfullyConnected); + ClientSq_pushbool(sqvm, g_MasterServerManager->m_bSuccessfullyConnected); return SQRESULT_NOTNULL; } // int function NSGetServerCount() SQRESULT SQ_GetServerCount(void* sqvm) { - ClientSq_pushinteger(sqvm, g_MasterServerManager->m_remoteServers.size()); + ClientSq_pushinteger(sqvm, g_MasterServerManager->m_vRemoteServers.size()); return SQRESULT_NOTNULL; } @@ -47,19 +47,19 @@ SQRESULT SQ_GetServerName(void* sqvm) { SQInteger serverIndex = ClientSq_getinteger(sqvm, 1); - if (serverIndex >= g_MasterServerManager->m_remoteServers.size()) + if (serverIndex >= g_MasterServerManager->m_vRemoteServers.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to get name of server index {} when only {} servers are available", serverIndex, - g_MasterServerManager->m_remoteServers.size()) + g_MasterServerManager->m_vRemoteServers.size()) .c_str()); return SQRESULT_ERROR; } - ClientSq_pushstring(sqvm, g_MasterServerManager->m_remoteServers[serverIndex].name, -1); + ClientSq_pushstring(sqvm, g_MasterServerManager->m_vRemoteServers[serverIndex].name, -1); return SQRESULT_NOTNULL; } @@ -68,19 +68,19 @@ SQRESULT SQ_GetServerDescription(void* sqvm) { SQInteger serverIndex = ClientSq_getinteger(sqvm, 1); - if (serverIndex >= g_MasterServerManager->m_remoteServers.size()) + if (serverIndex >= g_MasterServerManager->m_vRemoteServers.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to get description of server index {} when only {} servers are available", serverIndex, - g_MasterServerManager->m_remoteServers.size()) + g_MasterServerManager->m_vRemoteServers.size()) .c_str()); return SQRESULT_ERROR; } - ClientSq_pushstring(sqvm, g_MasterServerManager->m_remoteServers[serverIndex].description.c_str(), -1); + ClientSq_pushstring(sqvm, g_MasterServerManager->m_vRemoteServers[serverIndex].description.c_str(), -1); return SQRESULT_NOTNULL; } @@ -89,19 +89,19 @@ SQInteger SQ_GetServerMap(void* sqvm) { SQInteger serverIndex = ClientSq_getinteger(sqvm, 1); - if (serverIndex >= g_MasterServerManager->m_remoteServers.size()) + if (serverIndex >= g_MasterServerManager->m_vRemoteServers.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to get map of server index {} when only {} servers are available", serverIndex, - g_MasterServerManager->m_remoteServers.size()) + g_MasterServerManager->m_vRemoteServers.size()) .c_str()); return SQRESULT_ERROR; } - ClientSq_pushstring(sqvm, g_MasterServerManager->m_remoteServers[serverIndex].map, -1); + ClientSq_pushstring(sqvm, g_MasterServerManager->m_vRemoteServers[serverIndex].map, -1); return SQRESULT_NOTNULL; } @@ -110,19 +110,19 @@ SQRESULT SQ_GetServerPlaylist(void* sqvm) { SQInteger serverIndex = ClientSq_getinteger(sqvm, 1); - if (serverIndex >= g_MasterServerManager->m_remoteServers.size()) + if (serverIndex >= g_MasterServerManager->m_vRemoteServers.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to get playlist of server index {} when only {} servers are available", serverIndex, - g_MasterServerManager->m_remoteServers.size()) + g_MasterServerManager->m_vRemoteServers.size()) .c_str()); return SQRESULT_ERROR; } - ClientSq_pushstring(sqvm, g_MasterServerManager->m_remoteServers[serverIndex].playlist, -1); + ClientSq_pushstring(sqvm, g_MasterServerManager->m_vRemoteServers[serverIndex].playlist, -1); return SQRESULT_NOTNULL; } @@ -131,19 +131,19 @@ SQRESULT SQ_GetServerPlayerCount(void* sqvm) { SQInteger serverIndex = ClientSq_getinteger(sqvm, 1); - if (serverIndex >= g_MasterServerManager->m_remoteServers.size()) + if (serverIndex >= g_MasterServerManager->m_vRemoteServers.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to get playercount of server index {} when only {} servers are available", serverIndex, - g_MasterServerManager->m_remoteServers.size()) + g_MasterServerManager->m_vRemoteServers.size()) .c_str()); return SQRESULT_ERROR; } - ClientSq_pushinteger(sqvm, g_MasterServerManager->m_remoteServers[serverIndex].playerCount); + ClientSq_pushinteger(sqvm, g_MasterServerManager->m_vRemoteServers[serverIndex].playerCount); return SQRESULT_NOTNULL; } @@ -152,19 +152,19 @@ SQRESULT SQ_GetServerMaxPlayerCount(void* sqvm) { SQInteger serverIndex = ClientSq_getinteger(sqvm, 1); - if (serverIndex >= g_MasterServerManager->m_remoteServers.size()) + if (serverIndex >= g_MasterServerManager->m_vRemoteServers.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to get max playercount of server index {} when only {} servers are available", serverIndex, - g_MasterServerManager->m_remoteServers.size()) + g_MasterServerManager->m_vRemoteServers.size()) .c_str()); return SQRESULT_ERROR; } - ClientSq_pushinteger(sqvm, g_MasterServerManager->m_remoteServers[serverIndex].maxPlayers); + ClientSq_pushinteger(sqvm, g_MasterServerManager->m_vRemoteServers[serverIndex].maxPlayers); return SQRESULT_NOTNULL; } @@ -173,19 +173,19 @@ SQRESULT SQ_GetServerID(void* sqvm) { SQInteger serverIndex = ClientSq_getinteger(sqvm, 1); - if (serverIndex >= g_MasterServerManager->m_remoteServers.size()) + if (serverIndex >= g_MasterServerManager->m_vRemoteServers.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to get id of server index {} when only {} servers are available", serverIndex, - g_MasterServerManager->m_remoteServers.size()) + g_MasterServerManager->m_vRemoteServers.size()) .c_str()); return SQRESULT_ERROR; } - ClientSq_pushstring(sqvm, g_MasterServerManager->m_remoteServers[serverIndex].id, -1); + ClientSq_pushstring(sqvm, g_MasterServerManager->m_vRemoteServers[serverIndex].id, -1); return SQRESULT_NOTNULL; } @@ -194,19 +194,19 @@ SQRESULT SQ_ServerRequiresPassword(void* sqvm) { SQInteger serverIndex = ClientSq_getinteger(sqvm, 1); - if (serverIndex >= g_MasterServerManager->m_remoteServers.size()) + if (serverIndex >= g_MasterServerManager->m_vRemoteServers.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to get hasPassword of server index {} when only {} servers are available", serverIndex, - g_MasterServerManager->m_remoteServers.size()) + g_MasterServerManager->m_vRemoteServers.size()) .c_str()); return SQRESULT_ERROR; } - ClientSq_pushbool(sqvm, g_MasterServerManager->m_remoteServers[serverIndex].requiresPassword); + ClientSq_pushbool(sqvm, g_MasterServerManager->m_vRemoteServers[serverIndex].requiresPassword); return SQRESULT_NOTNULL; } @@ -215,19 +215,19 @@ SQRESULT SQ_GetServerRequiredModsCount(void* sqvm) { SQInteger serverIndex = ClientSq_getinteger(sqvm, 1); - if (serverIndex >= g_MasterServerManager->m_remoteServers.size()) + if (serverIndex >= g_MasterServerManager->m_vRemoteServers.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to get required mods count of server index {} when only {} servers are available", serverIndex, - g_MasterServerManager->m_remoteServers.size()) + g_MasterServerManager->m_vRemoteServers.size()) .c_str()); return SQRESULT_ERROR; } - ClientSq_pushinteger(sqvm, g_MasterServerManager->m_remoteServers[serverIndex].requiredMods.size()); + ClientSq_pushinteger(sqvm, g_MasterServerManager->m_vRemoteServers[serverIndex].requiredMods.size()); return SQRESULT_NOTNULL; } @@ -237,31 +237,31 @@ SQRESULT SQ_GetServerRequiredModName(void* sqvm) SQInteger serverIndex = ClientSq_getinteger(sqvm, 1); SQInteger modIndex = ClientSq_getinteger(sqvm, 2); - if (serverIndex >= g_MasterServerManager->m_remoteServers.size()) + if (serverIndex >= g_MasterServerManager->m_vRemoteServers.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to get hasPassword of server index {} when only {} servers are available", serverIndex, - g_MasterServerManager->m_remoteServers.size()) + g_MasterServerManager->m_vRemoteServers.size()) .c_str()); return SQRESULT_ERROR; } - if (modIndex >= g_MasterServerManager->m_remoteServers[serverIndex].requiredMods.size()) + if (modIndex >= g_MasterServerManager->m_vRemoteServers[serverIndex].requiredMods.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to get required mod name of mod index {} when only {} mod are available", modIndex, - g_MasterServerManager->m_remoteServers[serverIndex].requiredMods.size()) + g_MasterServerManager->m_vRemoteServers[serverIndex].requiredMods.size()) .c_str()); return SQRESULT_ERROR; } - ClientSq_pushstring(sqvm, g_MasterServerManager->m_remoteServers[serverIndex].requiredMods[modIndex].Name.c_str(), -1); + ClientSq_pushstring(sqvm, g_MasterServerManager->m_vRemoteServers[serverIndex].requiredMods[modIndex].Name.c_str(), -1); return SQRESULT_NOTNULL; } @@ -271,31 +271,31 @@ SQRESULT SQ_GetServerRequiredModVersion(void* sqvm) SQInteger serverIndex = ClientSq_getinteger(sqvm, 1); SQInteger modIndex = ClientSq_getinteger(sqvm, 2); - if (serverIndex >= g_MasterServerManager->m_remoteServers.size()) + if (serverIndex >= g_MasterServerManager->m_vRemoteServers.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to get required mod version of server index {} when only {} servers are available", serverIndex, - g_MasterServerManager->m_remoteServers.size()) + g_MasterServerManager->m_vRemoteServers.size()) .c_str()); return SQRESULT_ERROR; } - if (modIndex >= g_MasterServerManager->m_remoteServers[serverIndex].requiredMods.size()) + if (modIndex >= g_MasterServerManager->m_vRemoteServers[serverIndex].requiredMods.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to get required mod version of mod index {} when only {} mod are available", modIndex, - g_MasterServerManager->m_remoteServers[serverIndex].requiredMods.size()) + g_MasterServerManager->m_vRemoteServers[serverIndex].requiredMods.size()) .c_str()); return SQRESULT_ERROR; } - ClientSq_pushstring(sqvm, g_MasterServerManager->m_remoteServers[serverIndex].requiredMods[modIndex].Version.c_str(), -1); + ClientSq_pushstring(sqvm, g_MasterServerManager->m_vRemoteServers[serverIndex].requiredMods[modIndex].Version.c_str(), -1); return SQRESULT_NOTNULL; } @@ -314,14 +314,14 @@ SQRESULT SQ_TryAuthWithServer(void* sqvm) SQInteger serverIndex = ClientSq_getinteger(sqvm, 1); const SQChar* password = ClientSq_getstring(sqvm, 2); - if (serverIndex >= g_MasterServerManager->m_remoteServers.size()) + if (serverIndex >= g_MasterServerManager->m_vRemoteServers.size()) { ClientSq_pusherror( sqvm, fmt::format( "Tried to auth with server index {} when only {} servers are available", serverIndex, - g_MasterServerManager->m_remoteServers.size()) + g_MasterServerManager->m_vRemoteServers.size()) .c_str()); return SQRESULT_ERROR; } @@ -334,8 +334,8 @@ SQRESULT SQ_TryAuthWithServer(void* sqvm) // do auth g_MasterServerManager->AuthenticateWithServer( g_LocalPlayerUserID, - g_MasterServerManager->m_ownClientAuthToken, - g_MasterServerManager->m_remoteServers[serverIndex].id, + g_MasterServerManager->m_sOwnClientAuthToken, + g_MasterServerManager->m_vRemoteServers[serverIndex].id, (char*)password); return SQRESULT_NULL; @@ -344,14 +344,14 @@ SQRESULT SQ_TryAuthWithServer(void* sqvm) // bool function NSIsAuthenticatingWithServer() SQRESULT SQ_IsAuthComplete(void* sqvm) { - ClientSq_pushbool(sqvm, g_MasterServerManager->m_scriptAuthenticatingWithGameServer); + ClientSq_pushbool(sqvm, g_MasterServerManager->m_bScriptAuthenticatingWithGameServer); return SQRESULT_NOTNULL; } // bool function NSWasAuthSuccessful() SQRESULT SQ_WasAuthSuccessful(void* sqvm) { - ClientSq_pushbool(sqvm, g_MasterServerManager->m_successfullyAuthenticatedWithGameServer); + ClientSq_pushbool(sqvm, g_MasterServerManager->m_bSuccessfullyAuthenticatedWithGameServer); return SQRESULT_NOTNULL; } @@ -365,7 +365,7 @@ SQRESULT SQ_GetAuthFailReason(void* sqvm) // void function NSConnectToAuthedServer() SQRESULT SQ_ConnectToAuthedServer(void* sqvm) { - if (!g_MasterServerManager->m_hasPendingConnectionInfo) + if (!g_MasterServerManager->m_bHasPendingConnectionInfo) { ClientSq_pusherror(sqvm, fmt::format("Tried to connect to authed server before any pending connection info was available").c_str()); return SQRESULT_ERROR; @@ -388,7 +388,7 @@ SQRESULT SQ_ConnectToAuthedServer(void* sqvm) .c_str(), cmd_source_t::kCommandSrcCode); - g_MasterServerManager->m_hasPendingConnectionInfo = false; + g_MasterServerManager->m_bHasPendingConnectionInfo = false; return SQRESULT_NULL; } @@ -396,7 +396,7 @@ SQRESULT SQ_ConnectToAuthedServer(void* sqvm) SQRESULT SQ_TryAuthWithLocalServer(void* sqvm) { // do auth request - g_MasterServerManager->AuthenticateWithOwnServer(g_LocalPlayerUserID, g_MasterServerManager->m_ownClientAuthToken); + g_MasterServerManager->AuthenticateWithOwnServer(g_LocalPlayerUserID, g_MasterServerManager->m_sOwnClientAuthToken); return SQRESULT_NULL; } |