mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-10-14 07:17:44 +00:00
Add a Dev Overlay checkbox to activate RejoinTest from the session.
This makes this feature, very useful for checking for OOS, more easily accessible. Differential Revision: https://code.wildfiregames.com/D3199 This was SVN commit r24407.
This commit is contained in:
@@ -113,6 +113,13 @@ JS::Value JSI_SavedGame::StartSavedGame(ScriptInterface::CmptPrivate* pCmptPriva
|
||||
return guiContextMetadata;
|
||||
}
|
||||
|
||||
void ActivateRejoinTest(ScriptInterface::CmptPrivate*)
|
||||
{
|
||||
if (!g_Game || !g_Game->GetSimulation2() || !g_Game->GetTurnManager())
|
||||
return;
|
||||
g_Game->GetSimulation2()->ActivateRejoinTest(g_Game->GetTurnManager()->GetCurrentTurn() + 1);
|
||||
}
|
||||
|
||||
void JSI_SavedGame::RegisterScriptFunctions(const ScriptInterface& scriptInterface)
|
||||
{
|
||||
scriptInterface.RegisterFunction<JS::Value, &GetSavedGames>("GetSavedGames");
|
||||
@@ -121,5 +128,6 @@ void JSI_SavedGame::RegisterScriptFunctions(const ScriptInterface& scriptInterfa
|
||||
scriptInterface.RegisterFunction<void, std::wstring, std::wstring, JS::HandleValue, &SaveGamePrefix>("SaveGamePrefix");
|
||||
scriptInterface.RegisterFunction<void, JS::HandleValue, &QuickSave>("QuickSave");
|
||||
scriptInterface.RegisterFunction<void, &QuickLoad>("QuickLoad");
|
||||
scriptInterface.RegisterFunction<void, &ActivateRejoinTest>("ActivateRejoinTest");
|
||||
scriptInterface.RegisterFunction<JS::Value, std::wstring, &StartSavedGame>("StartSavedGame");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user