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:
Ykkrosh
2010-05-01 16:20:58 +00:00
parent 49574953b8
commit e140aa7baf
20 changed files with 229 additions and 101 deletions
+5 -1
View File
@@ -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;