Changeset View
Changeset View
Standalone View
Standalone View
source/ps/Game.cpp
Show First 20 Lines • Show All 319 Lines • ▼ Show 20 Lines | if (g_NetClient) | ||||
g_NetClient->LoadFinished(); | g_NetClient->LoadFinished(); | ||||
// Call the reallyStartGame GUI function, but only if it exists | // Call the reallyStartGame GUI function, but only if it exists | ||||
if (g_GUI && g_GUI->GetPageCount()) | if (g_GUI && g_GUI->GetPageCount()) | ||||
{ | { | ||||
shared_ptr<ScriptInterface> scriptInterface = g_GUI->GetActiveGUI()->GetScriptInterface(); | shared_ptr<ScriptInterface> scriptInterface = g_GUI->GetActiveGUI()->GetScriptInterface(); | ||||
ScriptInterface::Request rq(scriptInterface); | ScriptInterface::Request rq(scriptInterface); | ||||
JS::RootedValue global(rq.cx, scriptInterface->GetGlobalObject()); | JS::RootedValue global(rq.cx, rq.globalValue()); | ||||
if (scriptInterface->HasProperty(global, "reallyStartGame")) | if (scriptInterface->HasProperty(global, "reallyStartGame")) | ||||
scriptInterface->CallFunctionVoid(global, "reallyStartGame"); | scriptInterface->CallFunctionVoid(global, "reallyStartGame"); | ||||
} | } | ||||
debug_printf("GAME STARTED, ALL INIT COMPLETE\n"); | debug_printf("GAME STARTED, ALL INIT COMPLETE\n"); | ||||
// The call tree we've built for pregame probably isn't useful in-game. | // The call tree we've built for pregame probably isn't useful in-game. | ||||
if (CProfileManager::IsInitialised()) | if (CProfileManager::IsInitialised()) | ||||
▲ Show 20 Lines • Show All 133 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator