Remove JSInterface_Lobby IsRankedGame function duplicitous with g_GameAttributes.settings.RatingEnabled && !g_IsReplay, refs #3550, D2483.
This was SVN commit r23329.
This commit is contained in:
parent
b9dc24d5ec
commit
cf7635f57b
@ -49,5 +49,9 @@ class LobbyRatingReporter
|
|||||||
*/
|
*/
|
||||||
LobbyRatingReporter.Available = function()
|
LobbyRatingReporter.Available = function()
|
||||||
{
|
{
|
||||||
return Engine.HasXmppClient() && Engine.IsRankedGame() && g_GameAttributes.settings.PlayerData.length == 3;
|
return Engine.HasXmppClient() &&
|
||||||
|
!g_IsReplay &&
|
||||||
|
Engine.GetPlayerID() != -1 &&
|
||||||
|
g_GameAttributes.settings.RatingEnabled &&
|
||||||
|
g_GameAttributes.settings.PlayerData.length == 3;
|
||||||
};
|
};
|
||||||
|
@ -37,7 +37,6 @@ void JSI_Lobby::RegisterScriptFunctions(const ScriptInterface& scriptInterface)
|
|||||||
{
|
{
|
||||||
// Lobby functions
|
// Lobby functions
|
||||||
scriptInterface.RegisterFunction<bool, &JSI_Lobby::HasXmppClient>("HasXmppClient");
|
scriptInterface.RegisterFunction<bool, &JSI_Lobby::HasXmppClient>("HasXmppClient");
|
||||||
scriptInterface.RegisterFunction<bool, &JSI_Lobby::IsRankedGame>("IsRankedGame");
|
|
||||||
scriptInterface.RegisterFunction<void, bool, &JSI_Lobby::SetRankedGame>("SetRankedGame");
|
scriptInterface.RegisterFunction<void, bool, &JSI_Lobby::SetRankedGame>("SetRankedGame");
|
||||||
#if CONFIG2_LOBBY // Allow the lobby to be disabled
|
#if CONFIG2_LOBBY // Allow the lobby to be disabled
|
||||||
scriptInterface.RegisterFunction<void, std::wstring, std::wstring, std::wstring, std::wstring, int, &JSI_Lobby::StartXmppClient>("StartXmppClient");
|
scriptInterface.RegisterFunction<void, std::wstring, std::wstring, std::wstring, std::wstring, int, &JSI_Lobby::StartXmppClient>("StartXmppClient");
|
||||||
@ -78,11 +77,6 @@ bool JSI_Lobby::HasXmppClient(ScriptInterface::CxPrivate* UNUSED(pCxPrivate))
|
|||||||
return g_XmppClient;
|
return g_XmppClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool JSI_Lobby::IsRankedGame(ScriptInterface::CxPrivate* UNUSED(pCxPrivate))
|
|
||||||
{
|
|
||||||
return g_rankedGame;
|
|
||||||
}
|
|
||||||
|
|
||||||
void JSI_Lobby::SetRankedGame(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), bool isRanked)
|
void JSI_Lobby::SetRankedGame(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), bool isRanked)
|
||||||
{
|
{
|
||||||
g_rankedGame = isRanked;
|
g_rankedGame = isRanked;
|
||||||
|
Loading…
Reference in New Issue
Block a user