1
0
forked from 0ad/0ad

Immediately set the fog-of-war instead of waiting for session.js to load, refs #3168.

This was SVN commit r17832.
This commit is contained in:
elexis 2016-03-06 13:56:07 +00:00
parent 5a8d7d1a58
commit b155a28698
3 changed files with 9 additions and 0 deletions

View File

@ -345,6 +345,8 @@ void CGame::SetPlayerID(player_id_t playerID)
m_PlayerID = playerID;
if (m_TurnManager)
m_TurnManager->SetPlayerID(m_PlayerID);
m_Simulation2->SetCurrentDisplayedPlayer(g_Game->GetPlayerID());
}
void CGame::StartGame(JS::MutableHandleValue attribs, const std::string& savedState)

View File

@ -595,6 +595,11 @@ void CSimulation2::EnableSerializationTest()
m->m_EnableSerializationTest = true;
}
void CSimulation2::SetCurrentDisplayedPlayer(int playerID)
{
m->m_SimContext.SetCurrentDisplayedPlayer(playerID);
}
entity_id_t CSimulation2::AddEntity(const std::wstring& templateName)
{
return m->m_ComponentManager.AddEntity(templateName, m->m_ComponentManager.AllocateNewEntity());

View File

@ -57,6 +57,8 @@ public:
void EnableOOSLog();
void EnableSerializationTest();
void SetCurrentDisplayedPlayer(int playerID);
/**
* Load all scripts in the specified directory (non-recursively),
* so they can register new component types and functions. This