Simulation context cleanup, refs #3991, #3168.

Save the viewed player in the CGame class.
Add the const keyword back to the SimContext to help find mistakes at
compiletime.

This was SVN commit r18201.
This commit is contained in:
elexis
2016-05-19 19:42:07 +00:00
parent 1b3a12ea92
commit 6f744aef88
7 changed files with 34 additions and 24 deletions
+2 -4
View File
@@ -237,10 +237,8 @@ void SetPlayerID(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), int id)
void SetViewedPlayer(ScriptInterface::CxPrivate* UNUSED(pCxPrivate), int id)
{
if (!g_Game)
return;
g_Game->GetSimulation2()->GetSimContext().SetCurrentDisplayedPlayer(id);
if (g_Game)
g_Game->SetViewedPlayerID(id);
}
JS::Value GetEngineInfo(ScriptInterface::CxPrivate* pCxPrivate)