mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-26 03:46:14 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user