mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Avoid running the old simulation code in the background when it's not needed.
Optimise GUI updates to only occur when necessary. Switch to more peaceful music after starting the game. This was SVN commit r7492.
This commit is contained in:
+5
-1
@@ -47,6 +47,7 @@
|
||||
#include "simulation/TerritoryManager.h"
|
||||
#include "simulation/TriggerManager.h"
|
||||
#include "simulation/Projectile.h"
|
||||
#include "simulation2/Simulation2.h"
|
||||
|
||||
#define LOG_CATEGORY L"world"
|
||||
|
||||
@@ -92,9 +93,12 @@ void CWorld::Initialize(CGameAttributes *pAttribs)
|
||||
|
||||
try {
|
||||
reader = new CMapReader;
|
||||
CTriggerManager* pTriggerManager = NULL;
|
||||
if (!g_UseSimulation2)
|
||||
pTriggerManager = &g_TriggerManager;
|
||||
reader->LoadMap(mapfilename, m_Terrain, m_UnitManager, g_Renderer.GetWaterManager(),
|
||||
g_Renderer.GetSkyManager(), &g_LightEnv, m_pGame->GetView()->GetCamera(), m_pGame->GetView()->GetCinema(),
|
||||
&g_TriggerManager, m_pGame->GetSimulation2(), m_EntityManager);
|
||||
pTriggerManager, m_pGame->GetSimulation2(), m_EntityManager);
|
||||
// fails immediately, or registers for delay loading
|
||||
} catch (PSERROR_File&) {
|
||||
delete reader;
|
||||
|
||||
Reference in New Issue
Block a user